-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yml
71 lines (67 loc) · 2.22 KB
/
docker-compose.dev.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
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# eshop.blue - Development configuration
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
version: "3.7"
services:
frontend:
container_name: frontend
build:
context: ./frontend
dockerfile: Dockerfile
target: 'dev-stage'
args:
- FRONTEND_PORT=${FRONTEND_PORT:-3000}
- BACKEND_API_URL=${BACKEND_API_URL}
- FA_TOKEN=${FA_TOKEN}
ports:
- ${FRONTEND_PORT:-3000}:${FRONTEND_PORT:-3000}
volumes:
- './frontend:/app'
- '/app/node_modules' # exclude node_modules
command: '/bin/sh -c "yarn run serve"'
environment:
- CHOKIDAR_USEPOLLING=true
- FA_TOKEN=${FA_TOKEN}
- TERM=xterm-256color
stdin_open: true
tty: true
backend:
container_name: backend
build:
context: ./backend
dockerfile: Dockerfile
args:
- BACKEND_PORT=${BACKEND_PORT:-4000}
ports:
- ${BACKEND_PORT:-4000}:${BACKEND_PORT:-4000}
volumes:
- ./backend:/app
- '/app/node_modules' # exclude node_modules
entrypoint: 'pm2-dev start ecosystem.config.js'
environment:
- TERM=xterm-256color
- CHOKIDAR_USEPOLLING=true
- MONGODB_HOST=mongo
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASS=${MONGODB_PASS}
- MONGODB_DATABASE=${MONGODB_DATABASE}
- MONGODB_PORT=${MONGODB_PORT}
- JWT_SECRET=${JWT_SECRET}
- JWT_EXPIRATION=${JWT_EXPIRATION}
stdin_open: true
tty: true
mongo:
container_name: mongo
image: mongo
environment:
- TERM=xterm-256color
- ENV=development
- MONGO_DATA_DIR=/data/db
- MONGO_LOG_DIR=/dev/null
- MONGODB_USER=${MONGODB_USER}
- MONGODB_PASS=${MONGODB_PASS}
volumes:
- ./data/db:/data/db
ports:
- ${MONGODB_PORT}:${MONGODB_PORT}
command: mongod --port ${MONGODB_PORT}