Skip to content

Commit 76ae547

Browse files
Added redis-server container to docker container stack.
1 parent 781665c commit 76ae547

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,14 @@ services:
1313
ports:
1414
- "5434:5432"
1515

16+
redis:
17+
image: redis:7-alpine
18+
container_name: codebuilder-redis
19+
restart: unless-stopped
20+
ports:
21+
- "6379:6379"
22+
networks:
23+
- codebuilder-net
1624

1725

1826
api:
@@ -23,10 +31,16 @@ services:
2331
restart: unless-stopped
2432
env_file:
2533
- ./.env
34+
environment:
35+
# Use docker network alias for Redis
36+
QUEUE_REDIS_HOST: redis
37+
# Override application Redis servers config to use redis container
38+
REDIS_SERVERS: '{"AUTH":{"host":"redis","port":6379,"password":"","tls":false},"CACHE":{"host":"redis","port":6379,"password":"","tls":false}}'
2639
ports:
2740
- "4000:4000"
2841
depends_on:
2942
- db
43+
- redis
3044
entrypoint:
3145
- /bin/sh
3246
- -c

0 commit comments

Comments
 (0)