All checks were successful
Build and Push Docker Image / build (push) Successful in 1m5s
149 lines
3.4 KiB
YAML
149 lines
3.4 KiB
YAML
services:
|
|
caddy:
|
|
image: caddy:2-alpine
|
|
container_name: px360_test_caddy
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8080:80"
|
|
- "8443:443"
|
|
volumes:
|
|
- ./Caddyfile.test:/etc/caddy/Caddyfile:ro
|
|
- test_caddy_data:/data
|
|
- test_caddy_config:/config
|
|
- test_static_volume:/srv/static
|
|
- test_media_volume:/srv/media
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
networks:
|
|
- px360_test_net
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
web:
|
|
image: ${PX360_IMAGE:-gitea.tenhal.sa/marwan/hh:latest}
|
|
container_name: px360_test_web
|
|
restart: unless-stopped
|
|
volumes:
|
|
- test_static_volume:/app/staticfiles
|
|
- test_media_volume:/app/media
|
|
env_file:
|
|
- .env.staging
|
|
environment:
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- DB_USER=${POSTGRES_USER:-px360}
|
|
depends_on:
|
|
db:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_healthy
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/health/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 60s
|
|
networks:
|
|
- px360_test_net
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
celery:
|
|
image: ${PX360_IMAGE:-gitea.tenhal.sa/marwan/hh:latest}
|
|
container_name: px360_test_celery
|
|
restart: unless-stopped
|
|
command: celery -A config worker -l info --concurrency=2
|
|
env_file:
|
|
- .env.staging
|
|
environment:
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- DB_USER=${POSTGRES_USER:-px360}
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
networks:
|
|
- px360_test_net
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
celery-beat:
|
|
image: ${PX360_IMAGE:-gitea.tenhal.sa/marwan/hh:latest}
|
|
container_name: px360_test_celery_beat
|
|
restart: unless-stopped
|
|
command: celery -A config beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler
|
|
env_file:
|
|
- .env.staging
|
|
environment:
|
|
- DB_HOST=db
|
|
- DB_PORT=5432
|
|
- DB_USER=${POSTGRES_USER:-px360}
|
|
depends_on:
|
|
web:
|
|
condition: service_healthy
|
|
networks:
|
|
- px360_test_net
|
|
logging:
|
|
driver: json-file
|
|
options:
|
|
max-size: "10m"
|
|
max-file: "3"
|
|
|
|
db:
|
|
image: postgres:15-alpine
|
|
container_name: px360_test_db
|
|
restart: unless-stopped
|
|
ports:
|
|
- "5434:5432"
|
|
volumes:
|
|
- test_postgres_data:/var/lib/postgresql/data
|
|
environment:
|
|
- POSTGRES_DB=${POSTGRES_DB:-px360}
|
|
- POSTGRES_USER=${POSTGRES_USER:-px360}
|
|
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-px360}
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-px360}"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- px360_test_net
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: px360_test_redis
|
|
restart: unless-stopped
|
|
ports:
|
|
- "6380:6379"
|
|
volumes:
|
|
- test_redis_data:/data
|
|
healthcheck:
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 5
|
|
networks:
|
|
- px360_test_net
|
|
|
|
volumes:
|
|
test_postgres_data:
|
|
test_redis_data:
|
|
test_static_volume:
|
|
test_media_volume:
|
|
test_caddy_data:
|
|
test_caddy_config:
|
|
|
|
networks:
|
|
px360_test_net:
|
|
driver: bridge
|