-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (38 loc) · 1.03 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
version: '3.8'
services:
database:
container_name: housemate_db
image: mongo:latest
volumes:
- mongodbdata:/data/db
- ./init-mongo.js:/docker-entrypoint-initdb.d/mongo-init.js:ro # script for adding a user for the app
environment:
- MONGO_INITDB_DATABASE=houseDB
# you can access to the db via "$ mongosh -u houseAdmin -p housePassAdmin"
- MONGO_INITDB_ROOT_USERNAME=houseAdmin
- MONGO_INITDB_ROOT_PASSWORD=housePassAdmin
command: mongod --auth
ports:
- '27017:27017'
server:
container_name: housemate_backend
build: ./backend
environment:
- MONGODB_URL=mongodb://houseApp:housePass@database:27017/houseDB?retryWrites=true&w=majority
- PORT=5001
- JWT_SECRET=+j1Q1_VVZDji|mC@m}b;(Cf~K
- VERTICAL=prod
ports:
- "5001:5001"
depends_on:
- database
client:
container_name: housemate_frontend
build: ./frontend
ports:
- "3000:3000"
depends_on:
- server
volumes:
mongodbdata:
driver: local