-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·63 lines (58 loc) · 1.61 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: "3"
services:
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASS}
volumes:
- ./data/mongo:/data/db
mongo-express:
image: mongo-express
depends_on:
- mongo
restart: always
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: ${MONGO_USER}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${MONGO_PASS}
labels:
- 'traefik.backend=${PROJECT_NAME}_mongo'
- 'traefik.port=8081'
- 'traefik.frontend.rule=Host:mongo.${PROJECT_BASE_URL}'
node-back:
image: node:current-alpine
depends_on:
- mongo
environment:
MONGODB_URI: "${MONGO_USER}:${MONGO_PASS}@mongo:27017/${MONGO_DB}"
working_dir: /app
command: sh -c 'yarn install && yarn run start'
volumes:
- ./backend:/app
- ./data/src:/data
labels:
- 'traefik.backend=${PROJECT_NAME}_node_back'
- 'traefik.port=3000'
- 'traefik.frontend.rule=Host:back.${PROJECT_BASE_URL}'
node-front:
image: node:current-alpine
depends_on:
- node-back
working_dir: /app
command: sh -c 'yarn install && yarn run start'
volumes:
- ./frontend:/app
labels:
- 'traefik.backend=${PROJECT_NAME}_node_front'
- 'traefik.port=3000'
- 'traefik.frontend.rule=Host:${PROJECT_BASE_URL}'
traefik:
image: traefik
container_name: "${PROJECT_NAME}_traefik"
command: -c /dev/null --web --docker --logLevel=INFO
ports:
- '8000:80'
# - '8080:8080' # Dashboard
volumes:
- /var/run/docker.sock:/var/run/docker.sock