-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
57 lines (57 loc) · 1.23 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
version: '3'
services:
mongo:
container_name: mongo-dev
restart: always
image: mongo
env_file: .env
environment:
environment:
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_USER}
MONGO_INITDB_ROOT_USERNAME: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DATABASE}
volumes:
- ./mongoUser.js:/docker-entrypoint-initdb.d/001_users.js:ro
- ./mymongodb:/data/db
ports:
- '27017:27017'
api:
container_name: api-dev
env_file: .env
build:
dockerfile: Dockerfile.dev
context: ./api
links:
- mongo
depends_on:
- mongo
volumes:
- ./api/src:/app/src
- ./api/node_modules:/app/node/modules
environment:
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
- MONGO_DATABASE=${MONGO_DATABASE}
client:
container_name: dev-client
build:
dockerfile: Dockerfile.dev
context: ./client
volumes:
- './client:/app'
- '/app/node_modules'
ports:
- '3000:3000'
environment:
- NODE_ENV=development
nginx:
restart: always
depends_on:
- mongo
- api
- client
build:
dockerfile: Dockerfile
context: ./nginx
ports:
- '80:80'