ScoDoc/docker-compose.yml

66 lines
1.5 KiB
YAML
Raw Permalink Normal View History

2024-06-03 15:17:38 +02:00
services:
scodoc:
image: scodoc/scodoc
container_name: scodoc
restart: unless-stopped
environment:
SCODOC_DATABASE_URI: postgresql://scodb:scodb@db/SCODOC
CACHE_REDIS_HOST: cache
SCODOC_ADMIN_MAIL: admin@scodoc.local
SCODOC_ADMIN_PASSWORD: p@ssword
#SCODOC_MAIL_FROM: no-reply@scodoc.local
#MAIL_SERVER: smtp.scodoc.local
#MAIL_PORT: 587
#MAIL_USE_TLS: True
#MAIL_USERNAME: scodoc
#MAIL_PASSWORD: scodoc
ports:
- "127.0.0.1:8000:8000"
volumes:
- scodata:/opt/scodoc-data
depends_on:
db:
condition: service_started
cache:
condition: service_healthy
networks:
- db
- cache
db:
image: postgres
2024-06-03 15:17:38 +02:00
container_name: scodoc_db
restart: unless-stopped
environment:
POSTGRES_USER: scodb
POSTGRES_PASSWORD: scodb
volumes:
- scodb:/var/lib/postgresql/data
networks:
- db
cache:
image: valkey/valkey
container_name: scodoc_cache
restart: unless-stopped
networks:
- cache
healthcheck:
test: ["CMD", "valkey-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
watchtower:
image: containrrr/watchtower
container_name: watchtower
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/localtime:/etc/localtime:ro
command: scodoc scodoc_db scodoc_cache --schedule "0 0 2 * * *"
volumes:
scodata:
scodb:
networks:
db:
cache: