-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
95 lines (88 loc) · 2.19 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
version: '3.7'
services:
nct_social_ui:
image: nct_social_ui:r1
container_name: nct_social_ui_container
build:
context: ./client
dockerfile: Dockerfile
# volumes:
# - './:/app'
# - '/app/node_modules'
ports:
- 8002:80 # Map port 8002 in the server to port 80 in the container
networks:
- nct_social
nct_social_server:
image: nct_social_server:r1
container_name: nct_social_server_container
build:
context: ./server
dockerfile: Dockerfile
environment:
- NODE_ENV=${NODE_ENV}
- MONGO_URL=${MONGO_URL}
- JWT_SECRET_KEY=${JWT_SECRET_KEY}
- PORT=${PORT}
ports:
- 49160:8080
networks:
- nct_social
depends_on:
- mongo
nct_social_socket:
image: nct_social_socket:r1
container_name: nct_social_socket_container
build:
context: ./socket
dockerfile: Dockerfile
environment:
- NODE_ENV=${NODE_ENV}
- CLIENT_URL=${CLIENT_URL}
- PORT=${PORT}
ports:
- 49160:8080
networks:
- nct_social
mongo:
image: mongo
container_name: mongodb_container
# If you need to connect to your db from outside this container
# network_mode: host
command: mongod
environment:
- MONGO_INITDB_DATABASE=social_media_app
- MONGO_INITDB_ROOT_USERNAME=root
- MONGO_INITDB_ROOT_PASSWORD=123456
ports:
- 27017:27017
networks:
- nct_social
volumes:
# seeding scripts
# - ./mongo-entrypoint:/docker-entrypoint-initdb.d
# named volumes
- mongodb:/data/db
- mongoconfig:/data/configdb
- $PWD/mongo-entrypoint/:/docker-entrypoint-initdb.d/
mongo-express:
image: mongo-express
container_name: mongo_express_container
ports:
- 8081:8081
environment:
- ME_CONFIG_MONGODB_ADMINUSERNAME=admin
- ME_CONFIG_MONGODB_ADMINPASSWORD=123456
- ME_CONFIG_MONGODB_URL=mongodb://root:123456@mongo:27017/
networks:
- nct_social
depends_on:
- mongo
volumes:
# default dir on Ubuntu: /var/lib/docker/volumes
mongodb: null
mongoconfig:
null
networks:
nct_social:
driver: bridge