File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ services :
2+ server :
3+ build :
4+ context : .
5+ dockerfile : Dockerfile
6+ container_name : server
7+ hostname : server
8+ env_file :
9+ - .env
10+ environment :
11+ PORT : ${PORT}
12+ MONGO_URI : ${MONGO_URI}
13+ ports :
14+ - " ${PORT}:${PORT}"
15+ depends_on :
16+ - mongodb
17+ networks :
18+ - mongodb_network
19+ mongodb :
20+ image : mongo:latest
21+ container_name : mongodb
22+ hostname : mongodb
23+ volumes :
24+ - mongodb-data:/data/db/
25+ - mongodb-log:/var/log/mongodb/
26+ env_file :
27+ - .env
28+ environment :
29+ MONGO_INITDB_ROOT_USERNAME : ${MONGO_INITDB_ROOT_USERNAME}
30+ MONGO_INITDB_ROOT_PASSWORD : ${MONGO_INITDB_ROOT_PASSWORD}
31+ ports :
32+ - " 27017:27017"
33+ networks :
34+ - mongodb_network
35+
36+ volumes :
37+ mongodb-data :
38+ driver : local
39+ name : mongo-data
40+ mongodb-log :
41+ driver : local
42+ name : mongo-log
43+
44+ networks :
45+ mongodb_network :
46+ driver : bridge
47+ name : mongo-network
You can’t perform that action at this time.
0 commit comments