forked from krishnaacharyaa/profileFolio
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
46 lines (44 loc) · 1.05 KB
/
docker-compose.yaml
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
version: "3.8"
services:
mongodb:
image: mongo:latest
container_name: mongodb
environment:
MONGO_INITDB_DATABASE: profileFolio
ports:
- "27018:27017"
volumes:
- ./init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
backend:
container_name: backend-go
build: ./backend
ports:
- "8080:8080"
environment:
MONGO_URL: mongodb://mongodb:27017/profileFolio
depends_on:
- mongodb
frontend:
container_name: frontend-next
build:
context: ./frontend
dockerfile: Dockerfile
target: dev
restart: always
command: yarn dev
working_dir: /app
environment:
- NODE_ENV=development
- NEXT_PUBLIC_BACKEND_URL=http://backend:8080
#if you’re using Windows, you may need to uncomment the next line - Sol from @Kobe E
#- WATCHPACK_POLLING=true
volumes:
- ./frontend:/app
- /app/node_modules
- /app/.next
ports:
- 3000:3000
depends_on:
- backend
# docker system prune --all
# docker volume prune