-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
137 lines (127 loc) · 2.51 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
version: "3.3"
# 개발 전용! 배포에서는 패스워드등 민감 정보 환경변수화된 prod.yml 필요
services:
database:
image: bitnami/postgresql:latest
expose:
- "5432"
volumes:
- db:/var/lib/postgresql/data
networks:
- db-tier
environment:
- POSTGRES_USER=deepmush
- POSTGRES_PASSWORD=deepmush
- POSTGRES_DB=deepmush
tty: true
pgadmin:
image: dpage/pgadmin4
restart: always
networks:
- db-tier
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: deepmush
PGADMIN_LISTEN_PORT: 8082
ports:
- "8082:8082"
tty: true
mongodb:
image: mongo
restart: always
expose:
- "27017"
volumes:
- mongodb:/data/db
networks:
- db-tier
environment:
MONGO_INITDB_ROOT_USERNAME: deepmush
MONGO_INITDB_ROOT_PASSWORD: deepmush
MONGO_INITDB_DATABASE: deepmush
tty: true
mongo-express:
image: mongo-express
restart: always
depends_on:
- mongodb
networks:
- db-tier
ports:
- "8081:8081"
environment:
ME_CONFIG_MONGODB_SERVER: mongodb
ME_CONFIG_MONGODB_ADMINUSERNAME: deepmush
ME_CONFIG_MONGODB_ADMINPASSWORD: deepmush
tty: true
backend:
depends_on:
- database
- mongodb
build: ./backend
ports:
- "8000:8000"
volumes:
- ./backend:/backend
environment:
- USE_POSTGRES=1
- IS_DOCKER=1
networks:
- db-tier
- mq-tier
dns:
- 8.8.8.8
- 4.4.4.4
- 1.1.1.1
tty: true
migrate:
depends_on:
- database
- mongodb
build: ./backend
volumes:
- ./backend:/backend
environment:
- USE_POSTGRES=1
- IS_DOCKER=1
networks:
- db-tier
- mq-tier
entrypoint: "/bin/sh -c 'cd /backend ; while :; do python manage.py
makemigrations ; python manage.py migrate ; sleep 15s ; done;'"
tty: true
rabbitmq:
image: rabbitmq:3
networks:
- mq-tier
expose:
- "5672"
tty: true
worker:
build:
context: ./backend
volumes:
- ./backend:/backend
entrypoint: "/bin/sh ./run-celery.sh"
networks:
- db-tier
- mq-tier
depends_on:
- database
- mongodb
environment:
- USE_POSTGRES=1
- IS_DOCKER=1
dns:
- 8.8.8.8
- 4.4.4.4
- 1.1.1.1
tty: true
networks:
db-tier:
driver: bridge
mq-tier:
driver: bridge
volumes:
mongodb:
db: