perf: migrate DB of linkding from sqlite to postgres
This commit is contained in:
parent
01b23de071
commit
1e58a524b7
2 changed files with 40 additions and 0 deletions
|
|
@ -4,6 +4,7 @@ networks:
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
linkding_data:
|
linkding_data:
|
||||||
|
linkding_db:
|
||||||
miniflux_db:
|
miniflux_db:
|
||||||
|
|
||||||
services:
|
services:
|
||||||
|
|
@ -113,6 +114,11 @@ services:
|
||||||
|
|
||||||
LD_CSRF_TRUSTED_ORIGINS: https://bookmarks.alecodes.page
|
LD_CSRF_TRUSTED_ORIGINS: https://bookmarks.alecodes.page
|
||||||
|
|
||||||
|
LD_DB_HOST: tasks.linkding_db
|
||||||
|
LD_DB_ENGINE: postgres
|
||||||
|
LD_DB_DATABASE: linkding
|
||||||
|
LD_DB_USER: linkding
|
||||||
|
LD_DB_PASSWORD: ${LD_DB_PASSWORD}
|
||||||
deploy:
|
deploy:
|
||||||
rollback_config:
|
rollback_config:
|
||||||
failure_action: continue
|
failure_action: continue
|
||||||
|
|
@ -127,3 +133,26 @@ services:
|
||||||
- traefik.enable=true
|
- traefik.enable=true
|
||||||
- traefik.http.routers.linkding.rule=Host(`bookmarks.alecodes.page`)
|
- traefik.http.routers.linkding.rule=Host(`bookmarks.alecodes.page`)
|
||||||
- traefik.http.services.linkding.loadbalancer.server.port=9090
|
- traefik.http.services.linkding.loadbalancer.server.port=9090
|
||||||
|
|
||||||
|
linkding_db:
|
||||||
|
image: postgres:latest
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: linkding
|
||||||
|
POSTGRES_PASSWORD: ${LD_DB_PASSWORD}
|
||||||
|
POSTGRES_DB: linkding
|
||||||
|
volumes:
|
||||||
|
- linkding_db:/var/lib/postgresql/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "pg_isready", "-U", "linkding"]
|
||||||
|
interval: 10s
|
||||||
|
start_period: 30s
|
||||||
|
deploy:
|
||||||
|
rollback_config:
|
||||||
|
failure_action: continue
|
||||||
|
update_config:
|
||||||
|
delay: 2s
|
||||||
|
failure_action: rollback
|
||||||
|
order: start-first
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.labels.services_kind==${SERVICE_KIND:-common}
|
||||||
|
|
|
||||||
|
|
@ -54,6 +54,17 @@ LD_OIDC_CLIENT_SECRET: !vault |
|
||||||
31366234373764373031373161653736383336613336646631333562333864663639653263333762
|
31366234373764373031373161653736383336613336646631333562333864663639653263333762
|
||||||
61343031656664636431
|
61343031656664636431
|
||||||
|
|
||||||
|
LD_DB_PASSWORD: !vault |
|
||||||
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
|
61336166393034336332626331623164353630303132643664353932663237303262323538363166
|
||||||
|
3930356632666530623833623035383535613037306263350a646333343338613130393336616137
|
||||||
|
39636565373232313936356232336465303536303336303931306336343831343965336637306331
|
||||||
|
6661633062376463650a393033343265313534663334393335376336623232396530383866616432
|
||||||
|
38313663646336383864303730323234383264646361333737646361353630643661646437393736
|
||||||
|
37346635623466303265316363326432373630326232383639306436633166346534323833363836
|
||||||
|
34366564306430393935663366373861616238316531646439383933326434393966373164383538
|
||||||
|
63303864623130326134
|
||||||
|
|
||||||
MFA_MINIFLUX_TOKEN: !vault |
|
MFA_MINIFLUX_TOKEN: !vault |
|
||||||
$ANSIBLE_VAULT;1.1;AES256
|
$ANSIBLE_VAULT;1.1;AES256
|
||||||
31313436616136653564663265663939303936386462393731373461323363323938316238343962
|
31313436616136653564663265663939303936386462393731373461323363323938316238343962
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue