mirror of
https://github.com/fsecada01/Pygentic-AI.git
synced 2026-05-11 19:54:59 +00:00
69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
services:
|
|
web:
|
|
image: s3docker.francissecada.com/pygentic_ai:${IMAGE_TAG:-main-latest}
|
|
container_name: pygentic_ai
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: ${MEMORY_LIMIT:-1024mb}
|
|
reservations:
|
|
memory: ${MEMORY_RESERVATION:-512mb}
|
|
ports:
|
|
- "0.0.0.0:${PORT:-5051}:${INTERNAL_PORT:-5051}"
|
|
env_file:
|
|
- ./.env
|
|
environment:
|
|
- PORT=${INTERNAL_PORT:-5051}
|
|
- SERVER_ENV=${SERVER_ENV:-prod}
|
|
volumes:
|
|
- ./src/proxy_urls.db:/opt/pygentic_ai/src/proxy_urls.db
|
|
command: bash -c "/opt/pygentic_ai/docker/pygentic_ai/python_start.sh"
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "-H", "Host: pygenticai.francissecada.com", "http://localhost:${INTERNAL_PORT:-5051}/"]
|
|
interval: 30s
|
|
timeout: 10s
|
|
retries: 3
|
|
start_period: 40s
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.pygentic_ai.rule=Host(`pygenticai.francissecada.com`)
|
|
- traefik.http.routers.pygentic_ai.entrypoints=websecure
|
|
- traefik.http.routers.pygentic_ai.tls.certresolver=letsencrypt
|
|
- traefik.http.services.pygentic_ai.loadbalancer.server.url=http://${DOCKER_HOST_IP:-192.168.99.85}:${PORT:-5051}
|
|
networks:
|
|
- proxy
|
|
|
|
celery_service:
|
|
image: s3docker.francissecada.com/pygentic_ai:${IMAGE_TAG:-main-latest}
|
|
container_name: pygentic_ai_celery
|
|
restart: unless-stopped
|
|
deploy:
|
|
resources:
|
|
limits:
|
|
memory: ${CELERY_MEMORY_LIMIT:-512mb}
|
|
reservations:
|
|
memory: ${CELERY_MEMORY_RESERVATION:-256mb}
|
|
command: bash -c "/opt/pygentic_ai/docker/celery/start.sh"
|
|
env_file:
|
|
- ./.env
|
|
environment:
|
|
- PORT=${CELERY_PORT:-5052}
|
|
- SERVER_ENV=${SERVER_ENV:-prod}
|
|
- C_FORCE_ROOT=true
|
|
ports:
|
|
- "0.0.0.0:${CELERY_PORT:-5052}:${CELERY_PORT:-5052}"
|
|
labels:
|
|
- traefik.enable=true
|
|
- traefik.http.routers.celery_pygentic_ai.entrypoints=websecure
|
|
- traefik.http.routers.celery_pygentic_ai.rule=Host(`celery.pygenticai.francissecada.com`)
|
|
- traefik.http.routers.celery_pygentic_ai.tls.certresolver=letsencrypt
|
|
networks:
|
|
- proxy
|
|
depends_on:
|
|
- web
|
|
|
|
networks:
|
|
proxy:
|
|
external: true
|