-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.dev.yml
57 lines (51 loc) · 1.31 KB
/
docker-compose.dev.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
services:
app-dev:
image: todo-frontend-dev
build:
context: ./todo-frontend
dockerfile: ./dev.Dockerfile
volumes:
- ./todo-frontend:/usr/src/app
- /usr/src/app/node_modules # don't take node_modules into account
container_name: todo-frontend-dev
depends_on:
- backend-dev
debug-helper:
image: busybox
nginx:
image: nginx:1.20.1
volumes:
- ./nginx.dev.conf:/etc/nginx/nginx.conf:ro
ports:
- 8080:80
container_name: reverse-proxy
depends_on:
- app-dev
mongo:
image: initialized-mongo
ports:
- 3456:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: the_database
volumes:
- ./todo-backend/mongo/mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js
redis:
image: redis
ports:
- 6379:6379
command: ['redis-server', '--appendonly', 'yes'] # Overwrite the CMD
volumes: # Declare the volume
- ./todo-backend/redis_data:/data
backend-dev:
image: todo-backend
build:
context: ./todo-backend
dockerfile: ./dev.Dockerfile
environment:
MONGO_URL: mongodb://root:example@mongo:27017/the_database
REDIS_URL: redis://redis:6379
depends_on:
- mongo
- redis