Skip to content

Commit c6916ea

Browse files
Merge pull request #9 from Rodribm10/patch-2
Update docker-compose.yml
2 parents 7f35a9a + 6234e38 commit c6916ea

File tree

1 file changed

+9
-24
lines changed

1 file changed

+9
-24
lines changed

docker-compose.yml

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,15 @@ version: "3.8"
33
services:
44
api:
55
image: evo-ai-api:latest
6-
build: .
7-
container_name: evo-ai-api
86
depends_on:
9-
postgres:
10-
condition: service_healthy
11-
redis:
12-
condition: service_healthy
7+
- postgres
8+
- redis
139
ports:
1410
- "8000:8000"
1511
environment:
1612
POSTGRES_CONNECTION_STRING: postgresql://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/evo_ai
1713
REDIS_HOST: redis
18-
REDIS_PORT: 6379
14+
REDIS_PORT: ${REDIS_PORT:-6379}
1915
REDIS_PASSWORD: ${REDIS_PASSWORD:-""}
2016
REDIS_SSL: "false"
2117
REDIS_KEY_PREFIX: "a2a:"
@@ -29,7 +25,6 @@ services:
2925
volumes:
3026
- ./logs:/app/logs
3127
- ./static:/app/static
32-
restart: unless-stopped
3328
healthcheck:
3429
test: ["CMD", "curl", "-f", "http://localhost:8000/"]
3530
interval: 30s
@@ -41,12 +36,9 @@ services:
4136
limits:
4237
cpus: "1"
4338
memory: 1G
44-
networks:
45-
- evo-network
4639

4740
postgres:
4841
image: postgres:14-alpine
49-
container_name: evo-ai-postgres
5042
environment:
5143
POSTGRES_USER: postgres
5244
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
@@ -55,15 +47,12 @@ services:
5547
- "${POSTGRES_PORT:-5432}:5432"
5648
volumes:
5749
- postgres_data:/var/lib/postgresql/data
58-
restart: unless-stopped
5950
healthcheck:
6051
test: ["CMD-SHELL", "pg_isready -U postgres"]
6152
interval: 10s
6253
timeout: 5s
6354
retries: 5
6455
start_period: 10s
65-
networks:
66-
- evo-network
6756
deploy:
6857
resources:
6958
limits:
@@ -72,8 +61,12 @@ services:
7261

7362
redis:
7463
image: redis:alpine
75-
container_name: evo-ai-redis
76-
command: redis-server --appendonly yes ${REDIS_PASSWORD:+--requirepass ${REDIS_PASSWORD}}
64+
command:
65+
- redis-server
66+
- --appendonly
67+
- "yes"
68+
- --requirepass
69+
- "${REDIS_PASSWORD}"
7770
ports:
7871
- "${REDIS_PORT:-6379}:6379"
7972
volumes:
@@ -83,9 +76,6 @@ services:
8376
interval: 5s
8477
timeout: 30s
8578
retries: 50
86-
restart: unless-stopped
87-
networks:
88-
- evo-network
8979
deploy:
9080
resources:
9181
limits:
@@ -97,8 +87,3 @@ volumes:
9787
name: ${POSTGRES_VOLUME_NAME:-evo-ai-postgres-data}
9888
redis_data:
9989
name: ${REDIS_VOLUME_NAME:-evo-ai-redis-data}
100-
101-
networks:
102-
evo-network:
103-
name: ${NETWORK_NAME:-evo-network}
104-
driver: bridge

0 commit comments

Comments
 (0)