Files
cipher/compose.yml
Kappeh ed5de003ee
All checks were successful
Deploy / Deploy (push) Successful in 19s
Add CI/CD workflow
2026-01-29 20:27:39 +00:00

65 lines
1.7 KiB
YAML

services:
discord_bot:
build: .
user: 2017:2017 # cipher:cipher
depends_on:
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
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
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
networks:
cipher_network:
driver: bridge
secrets:
postgres_password:
environment: POSTGRES_PASSWORD
volumes:
http_cache:
postgres_data: