forked from lyolishe/Asteroids
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (48 loc) · 1.02 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
version: "3"
services:
app:
image: mdsdimat/node-prakt
depends_on:
- postgres
- mongo
environment:
DATABASE_URL: postgres://postgres:newPassword@postgres:5432/asteroids
NODE_ENV: development
PORT: 9001
ports:
- "3000:3000"
command: >
bash -c "npm run api:dbsync
&& npm run start"
app_api:
image: mdsdimat/node-prakt
depends_on:
- postgres
- mongo
environment:
DATABASE_URL: postgres://postgres:newPassword@postgres:5432/asteroids
NODE_ENV: development
PORT: 9001
ports:
- "9001:9001"
command: npm run api
postgres:
image: postgres:12
ports:
- "5432:5432"
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: newPassword
POSTGRES_DB: asteroids
mongo:
image: mongo
ports:
- "27017:27017"
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
command: mongod
volumes:
db-data: