Skip to content

Commit 5480d8e

Browse files
mihowDebian
authored andcommitted
chore: use external db and redis servers for prod
1 parent 7a852da commit 5480d8e

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

docker-compose.production.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
# This is a transitional production configuration.
2-
# Redis and celery will be external services in the final production configuration.
32
# Traffic or NGINX may or may not be used in the final production configuration
43
# but the Django container will not expose its port to the host (there will be more than one container).
5-
version: "3"
64

75
services:
86
django: &django
@@ -11,8 +9,6 @@ services:
119
# This is the most important setting to test the production configuration of Django.
1210
dockerfile: ./compose/production/django/Dockerfile
1311
image: insectai/ami_backend
14-
depends_on:
15-
- redis
1612
env_file:
1713
- ./.envs/.production/.django
1814
- ./.envs/.production/.postgres
@@ -21,16 +17,12 @@ services:
2117
ports:
2218
- "5001:5000"
2319
extra_hosts:
24-
- "db.host.internal:172.16.104.50"
25-
# - "host.docker.internal:host-gateway"
20+
- "db:${DATABASE_IP}"
21+
- "redis:${REDIS_IP}"
2622
command: /start
2723
scale: 1 # Can't scale until the load balancer is within the compose config
2824
restart: always
2925

30-
redis:
31-
image: redis:6
32-
restart: always
33-
3426
celeryworker:
3527
<<: *django
3628
scale: 1

0 commit comments

Comments
 (0)