commit
c6916eabc5
@ -3,19 +3,15 @@ version: "3.8"
|
|||||||
services:
|
services:
|
||||||
api:
|
api:
|
||||||
image: evo-ai-api:latest
|
image: evo-ai-api:latest
|
||||||
build: .
|
|
||||||
container_name: evo-ai-api
|
|
||||||
depends_on:
|
depends_on:
|
||||||
postgres:
|
- postgres
|
||||||
condition: service_healthy
|
- redis
|
||||||
redis:
|
|
||||||
condition: service_healthy
|
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_CONNECTION_STRING: postgresql://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/evo_ai
|
POSTGRES_CONNECTION_STRING: postgresql://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/evo_ai
|
||||||
REDIS_HOST: redis
|
REDIS_HOST: redis
|
||||||
REDIS_PORT: 6379
|
REDIS_PORT: ${REDIS_PORT:-6379}
|
||||||
REDIS_PASSWORD: ${REDIS_PASSWORD:-""}
|
REDIS_PASSWORD: ${REDIS_PASSWORD:-""}
|
||||||
REDIS_SSL: "false"
|
REDIS_SSL: "false"
|
||||||
REDIS_KEY_PREFIX: "a2a:"
|
REDIS_KEY_PREFIX: "a2a:"
|
||||||
@ -29,7 +25,6 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./logs:/app/logs
|
- ./logs:/app/logs
|
||||||
- ./static:/app/static
|
- ./static:/app/static
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
|
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
@ -41,12 +36,9 @@ services:
|
|||||||
limits:
|
limits:
|
||||||
cpus: "1"
|
cpus: "1"
|
||||||
memory: 1G
|
memory: 1G
|
||||||
networks:
|
|
||||||
- evo-network
|
|
||||||
|
|
||||||
postgres:
|
postgres:
|
||||||
image: postgres:14-alpine
|
image: postgres:14-alpine
|
||||||
container_name: evo-ai-postgres
|
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
|
||||||
@ -55,15 +47,12 @@ services:
|
|||||||
- "${POSTGRES_PORT:-5432}:5432"
|
- "${POSTGRES_PORT:-5432}:5432"
|
||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
restart: unless-stopped
|
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
start_period: 10s
|
start_period: 10s
|
||||||
networks:
|
|
||||||
- evo-network
|
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
@ -72,8 +61,12 @@ services:
|
|||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
container_name: evo-ai-redis
|
command:
|
||||||
command: redis-server --appendonly yes ${REDIS_PASSWORD:+--requirepass ${REDIS_PASSWORD}}
|
- redis-server
|
||||||
|
- --appendonly
|
||||||
|
- "yes"
|
||||||
|
- --requirepass
|
||||||
|
- "${REDIS_PASSWORD}"
|
||||||
ports:
|
ports:
|
||||||
- "${REDIS_PORT:-6379}:6379"
|
- "${REDIS_PORT:-6379}:6379"
|
||||||
volumes:
|
volumes:
|
||||||
@ -83,9 +76,6 @@ services:
|
|||||||
interval: 5s
|
interval: 5s
|
||||||
timeout: 30s
|
timeout: 30s
|
||||||
retries: 50
|
retries: 50
|
||||||
restart: unless-stopped
|
|
||||||
networks:
|
|
||||||
- evo-network
|
|
||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
@ -97,8 +87,3 @@ volumes:
|
|||||||
name: ${POSTGRES_VOLUME_NAME:-evo-ai-postgres-data}
|
name: ${POSTGRES_VOLUME_NAME:-evo-ai-postgres-data}
|
||||||
redis_data:
|
redis_data:
|
||||||
name: ${REDIS_VOLUME_NAME:-evo-ai-redis-data}
|
name: ${REDIS_VOLUME_NAME:-evo-ai-redis-data}
|
||||||
|
|
||||||
networks:
|
|
||||||
evo-network:
|
|
||||||
name: ${NETWORK_NAME:-evo-network}
|
|
||||||
driver: bridge
|
|
||||||
|
Loading…
Reference in New Issue
Block a user