Files
cbwebreader/docker-compose.yml
T
ajurna 77a80dd322 **Relocate Nginx configuration to the compose directory**
- Moved `nginx.conf` from `cbreader/settings/` to `compose/` for better organization of deployment-specific files.
- Updated `docker-compose.yml` to reference the new path for Nginx configuration.
2026-10-14 12:11:07 +01:00

70 lines
1.6 KiB
YAML

services:
cbwebreader:
build: .
image: ajurna/cbwebreader
env_file: .env
depends_on:
database:
condition: service_healthy
expose:
- 8000
volumes:
# COMIC_BOOK_VOLUME is the path *inside* the container; the host path is
# a separate variable so a Windows host path is not passed to Django.
- ${COMIC_BOOK_HOST_PATH}:${COMIC_BOOK_VOLUME}
- static_files:/static
- media_files:/media
- .env:/src/.env
command: sh entrypoint.sh
restart: unless-stopped
cbwebreader-cron:
build: .
image: ajurna/cbwebreader
env_file: .env
depends_on:
database:
condition: service_healthy
volumes:
- ${COMIC_BOOK_HOST_PATH}:${COMIC_BOOK_VOLUME}
- media_files:/media
- .env:/src/.env
command: sh entrypoint-cron.sh
restart: unless-stopped
database:
image: postgres:16-alpine
expose:
- 5432
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
interval: 5s
timeout: 10s
retries: 3
environment:
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASS}
POSTGRES_DB: ${DB_DATABASE}
restart: unless-stopped
nginx:
image: nginx:1-alpine
volumes:
- static_files:/static
- media_files:/media
- ./compose/nginx.conf:/etc/nginx/conf.d/default.conf
ports:
- "${WEB_PORT:-8337}:80"
depends_on:
cbwebreader:
condition: service_healthy
restart: unless-stopped
volumes:
static_files:
media_files:
postgres_data: