79 lines
1.7 KiB
YAML
79 lines
1.7 KiB
YAML
services:
|
|
web:
|
|
image: ghcr.io/zeecka/aperisolve:latest
|
|
#build: .
|
|
container_name: aperisolve-web
|
|
restart: always
|
|
ports:
|
|
- "5000:5000"
|
|
volumes:
|
|
- apresults:/aperisolve/results
|
|
depends_on:
|
|
postgres:
|
|
condition: service_healthy
|
|
redis:
|
|
condition: service_started
|
|
worker:
|
|
condition: service_started
|
|
env_file:
|
|
- .env
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "dd if=/dev/urandom of=/tmp/healthcheck.png bs=1 count=1000000 && curl -X POST -F 'image=@/tmp/healthcheck.png' http://localhost:5000/upload -s -o /dev/null -w '%{http_code}' | grep -q 200"]
|
|
interval: 3600s
|
|
timeout: 30s
|
|
retries: 3
|
|
start_period: 900s
|
|
|
|
worker:
|
|
image: ghcr.io/zeecka/aperisolve:latest
|
|
#build: .
|
|
container_name: aperisolve-worker
|
|
restart: always
|
|
command: rq worker default --url redis://redis:6379/0
|
|
volumes:
|
|
- apresults:/aperisolve/results
|
|
depends_on:
|
|
- redis
|
|
- postgres
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
- CLEAR_AT_RESTART=0 # Always false for worker to prevent double clearing
|
|
- SKIP_IHDR_FILL=1
|
|
|
|
postgres:
|
|
image: postgres:18
|
|
container_name: postgres
|
|
restart: always
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U aperiuser -d aperisolve"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
env_file:
|
|
- .env
|
|
|
|
redis:
|
|
image: redis:7
|
|
container_name: redis
|
|
restart: always
|
|
env_file:
|
|
- .env
|
|
|
|
rqdashboard:
|
|
image: eoranged/rq-dashboard
|
|
container_name: rq-dashboard
|
|
restart: always
|
|
ports:
|
|
- "9181:9181"
|
|
depends_on:
|
|
- redis
|
|
env_file:
|
|
- .env
|
|
|
|
volumes:
|
|
apresults:
|
|
pgdata:
|