mirror of
https://github.com/ajurna/cbwebreader.git
synced 2026-11-02 10:36:55 +00:00
- Restructured `Dockerfile` to include a dedicated frontend build stage and improved runtime configurations. - Added new health checks and adjusted environment variables for better container management. - Updated cron job configurations to leverage `/opt/venv` and align with new paths. - Refined `docker-compose` files for multi-service setups, including better volume and environment variable handling. - Migrated `cbwebreader-cron` service setup and improved restart policies across the board. - Enhanced `.gitea` CI workflow to use updated tools (`uv`), streamline buildx processes, and ensure proper version extraction from metadata.
70 lines
1.6 KiB
YAML
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
|
|
- ./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:
|