-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
48 lines (43 loc) · 1.28 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
version: '3.8'
services:
mongodb:
image: mongo:latest
volumes:
- mongo-data:/data/db
environment:
- MONGO_INITDB_ROOT_USERNAME=mongoadmin
- MONGO_INITDB_ROOT_PASSWORD=secret
ports:
- "27017:27017"
networks:
- fullstack-chatapp
backend:
build:
context: ./backend
dockerfile: Dockerfile
container_name: full-stack_backend
environment:
- NODE_ENV=production
- MONGODB_URI=mongodb://mongoadmin:secret@mongodb:27017/dbname?authSource=admin
- JWT_SECRET=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJPbmxpbmUgSldUIEJ1aWxkZXIiLCJpYXQiOjE3MzI2NTMxMDcsImV4cCI6MTc2NDE4OTEwNywiYXVkIjoid3d3LmV4YW1wbGUuY29tIiwic3ViIjoianJvY2tldEBleGFtcGxlLmNvbSIsIkdpdmVuTmFtZSI6IkpvaG5ueSIsIlN1cm5hbWUiOiJSb2NrZXQiLCJFbWFpbCI6Impyb2NrZXRAZXhhbXBsZS5jb20iLCJSb2xlIjpbIk1hbmFnZXIiLCJQcm9qZWN0IEFkbWluaXN0cmF0b3IiXX0.qE3lxrcV9TM3nujRqJVeCHPd_4WFPO9eVZj8A_kjabI
- PORT=5001
depends_on:
- mongodb
networks:
- fullstack-chatapp
frontend:
build:
context: ./frontend
dockerfile: Dockerfile
container_name: full-stack_frontend
ports:
- "80:80"
depends_on:
- backend
networks:
- fullstack-chatapp
networks:
fullstack-chatapp:
driver: bridge
volumes:
mongo-data: