-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (49 loc) · 1.27 KB
/
docker-compose.yml
File metadata and controls
50 lines (49 loc) · 1.27 KB
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
version: "3"
services:
ihub-ui:
container_name: ihub-ui_container
image: gabardata/ihub-ui:latest
build:
context: ./ui
args:
- IHUB_API_BASE_URI=http://localhost:5005
ports:
- 3000:80
environment:
- NODE_ENV=development
- IHUB_API_BASE_URI=http://localhost:5005 # this is passed to the container built at final stage, the build stage has no access to it
volumes:
- ./ui:/app
- /app/node_modules
depends_on:
- ihub-api
ihub-api:
container_name: ihub-api_container
image: gabardata/ihub-api:latest
build: ./api
ports:
- 5005:5005
environment:
- NODE_ENV=development
- PORT=5005 # this is where express app will be listening on server/container
- MONGODB_URI=mongodb://mongo_db:27017
- DB_NAME=ideadb
- DB_USER=dbuser1
- DB_PASSWORD=dbpassword1
volumes:
- ./api:/app # move this to docker-compose.dev.yml
- /app/node_modules
command: npm run dev
depends_on:
- mongo_db
mongo_db:
container_name: mongodb_container
image: mongo
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=dbuser1
- MONGO_INITDB_ROOT_PASSWORD=dbpassword1
volumes:
- mongo-db:/data/db
volumes:
mongo-db: {}