-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
71 lines (68 loc) · 1.62 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
64
65
66
67
68
69
70
71
# This file sets up the docker container ecosystem that runs our three services in unison.
# It can be started up by running "docker compose up" (or make run) in this directory
version: "3.7"
services:
db:
image: postgres
healthcheck:
test: ["CMD", "pg_isready", "-q", "-d", "postgres", "-U", "postgres"]
timeout: 45s
interval: 10s
retries: 10
restart: always
environment:
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
POSTGRES_DB: daiData
volumes:
- pgdata:/var/lib/postgresql/data
- ./dbInit:/dbInit
ports:
- "5432:5432"
networks:
- app-network
server:
build:
context: ./daiagon-alley-server
dockerfile: Dockerfile
image: daiagon-alley-server
container_name: daiagon-alley-server
command: /usr/src/app/node_modules/.bin/nodemon app.js
volumes:
- ./daiagon-alley-server/:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- db
ports:
- "5000:5000"
env_file: ./daiagon-alley-server/.env
environment:
- NODE_ENV=development
networks:
- app-network
client:
build:
context: ./daiagon-alley-app
dockerfile: Dockerfile
environment:
- CHOKIDAR_USEPOLLING=true
image: daiagon-alley-app
container_name: daiagon-alley-app
command: npm start
volumes:
- ./daiagon-alley-app/:/usr/src/app
- /usr/src/app/node_modules
depends_on:
- server
ports:
- "3001:3000"
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
pgdata:
node_modules:
web-root:
driver: local