63 lines
1.4 KiB
YAML
63 lines
1.4 KiB
YAML
secrets:
|
|
index_db_pass:
|
|
external: true
|
|
|
|
networks:
|
|
reverse_proxy:
|
|
external: true
|
|
|
|
volumes:
|
|
index_db:
|
|
webdb_ssh:
|
|
webdb_time_machine:
|
|
|
|
services:
|
|
webdb:
|
|
image: webdb/app
|
|
restart: unless-stopped
|
|
networks:
|
|
- default
|
|
- reverse_proxy
|
|
volumes:
|
|
- "webdb_ssh:/root/.ssho"
|
|
- "webdb_time_machine:/usr/src/app/static/version"
|
|
environment:
|
|
SCAN_HOSTS: db,tasks.db
|
|
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}
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.index.rule=Host(`index.alecodes.page`)
|
|
- traefik.http.services.index.loadbalancer.server.port=22071
|
|
|
|
db:
|
|
image: postgres
|
|
restart: unless-stopped
|
|
secrets:
|
|
- index_db_pass
|
|
volumes:
|
|
- index_db:/var/lib/postgresql/data
|
|
- type: tmpfs
|
|
target: /dev/shm
|
|
tmpfs:
|
|
size: 134217728 # 128*2^20 bytes = 128Mb
|
|
environment:
|
|
POSTGRES_PASSWORD_FILE: /run/secrets/index_db_pass
|
|
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}
|