Files
cipher/compose.yml
Kappeh ae418c27db
All checks were successful
Deploy / Deploy (push) Successful in 32s
Enable docker image update notifications
2026-02-20 21:15:10 +00:00

80 lines
2.1 KiB
YAML

services:
discord_bot:
build: .
user: 2017:2017 # cipher:cipher
depends_on:
init:
condition: service_completed_successfully
restart: true
postgres:
condition: service_healthy
restart: true
env_file: ./.env
networks:
- cipher_network
volumes:
- http_cache:/app/http-cacache:rw
restart: unless-stopped
postgres:
image: postgres:17.6
user: 2017:2017 # cipher:cipher
restart: unless-stopped
depends_on:
init:
condition: service_completed_successfully
restart: true
healthcheck:
test: ["CMD-SHELL", "pg_isready -U cipher -d cipher"]
interval: 10s
retries: 5
start_period: 30s
timeout: 10s
networks:
- cipher_network
secrets:
- postgres_password
environment:
POSTGRES_DB: cipher
POSTGRES_USER: cipher
POSTGRES_PASSWORD_FILE: /run/secrets/postgres_password
PGDATA: /var/lib/postgresql/data
volumes:
- postgres_data:/var/lib/postgresql/data:rw
labels:
diun.enable: "true"
diun.watch_repo: "true"
diun.include_tags: "latest"
init:
image: busybox:1.37.0
user: root:root
command: /init.sh
restart: no
network_mode: none
volumes:
- ./init.sh:/init.sh:ro
# Used for resolving user and group names in init script
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
# Mount all named volumes so they can be initialised
- http_cache:/http_cache:rw
- postgres_data:/postgres_data:rw
labels:
diun.enable: "true"
diun.watch_repo: "true"
diun.include_tags: "latest"
networks:
cipher_network:
driver: bridge
secrets:
postgres_password:
environment: POSTGRES_PASSWORD
volumes:
http_cache:
postgres_data: