-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
54 lines (51 loc) · 1.43 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
version: '3'
services:
# express pos backend service
pos-backend:
container_name: express-pos_core
build: ./core
restart: always
working_dir: /user/src/express-pos
volumes:
- ./core:/user/src/express-pos
depends_on:
- pos-mongo
env_file:
- ./.env
environment:
WAIT_HOSTS: 'express-pos_mongo:${MONGO_PORT}'
MONGODB_URI: 'mongodb://${ROOT_USERNAME}:${ROOT_PASSWORD}@pos-mongo:${MONGO_PORT}/${DATABASE_NAME}?authSource=admin'
ports:
- '3000:3000'
- '9229:9229'
command: npm run debug
# express pos mongo database service
pos-mongo:
container_name: express-pos_mongo
image: mongo
restart: always
env_file:
- ./.env
environment:
MONGO_INITDB_DATABASE: ${DATABASE_NAME}
MONGO_INITDB_ROOT_USERNAME: ${ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${ROOT_PASSWORD}
ports:
- '${MONGO_PORT}:${MONGO_PORT}'
# mongo express web ui
pos-mongo-express:
container_name: mongo-express
image: mongo-express
restart: always
depends_on:
- pos-mongo
env_file:
- ./.env
environment:
ME_CONFIG_MONGODB_SERVER: express-pos_mongo
ME_CONFIG_MONGODB_ADMINUSERNAME: ${ROOT_USERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${ROOT_PASSWORD}
ME_CONFIG_BASICAUTH_USERNAME: ${MONGOEXPRESS_LOGIN}
ME_CONFIG_BASICAUTH_PASSWORD: ${MONGOEXPRESS_PASSWORD}
ports:
- '8081:8081'