-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompose.yml
71 lines (65 loc) · 1.53 KB
/
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
64
65
66
67
68
69
70
71
services:
mongodb:
image: mongo
ports:
- 127.0.0.1:27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: password
volumes:
- db-data:/data/db
- ./mongo/data:/home/data
working_dir: /home/data
backend:
image: node
user: root
environment:
- PORT=3000
- DATABASE_URL=postgres://root:password@db:5432/app
- JWT_SECRET=998c2614eb0acf4eea946414667e78598e286a6c6b3911602f8b23a76811196b
- MONGO_URL=mongodb://root:password@mongodb:27017/app?authSource=admin
- JWT_EXPIRES_IN=2592000
ports:
- 3000:3000
working_dir: /home/app
volumes:
- ./backend:/home/app
- /home/app/node_modules
command: sh -c "npm install && npm install -g sequelize-cli && npm run dev"
depends_on:
- db
- mongodb
db:
image: postgres
environment:
POSTGRES_USER: root
POSTGRES_PASSWORD: password
POSTGRES_DB: app
volumes:
- pg-data:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4
environment:
PGADMIN_DEFAULT_EMAIL: [email protected]
PGADMIN_DEFAULT_PASSWORD: admin
ports:
- 5050:80
depends_on:
- db
frontend:
image: node
user: root
working_dir: /home/node
command: sh -c "npm install && npm run dev"
ports:
- 8080:8080
environment:
- NODE_ENV=development
volumes:
- ./frontend:/home/node
- /node/node_modules
depends_on:
- backend
volumes:
db-data:
pg-data: