-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
41 lines (41 loc) · 1.09 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
version: '3'
services:
postgres:
container_name: postgres
image: postgres:latest
environment:
- POSTGRES_USER=${PGUSER}
- POSTGRES_HOST=${PGHOST}
- POSTGRES_DB=${PGDATABASE}
- POSTGRES_PASSWORD=${PGPASSWORD}
- POSTGRES_PORT=${PGPORT}
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
web-app:
build:
context: ./web-app
dockerfile: Dockerfile
volumes:
- './web-app:/app'
- '/app/node_modules'
ports:
- 3002:3000
environment:
- CHOKIDAR_USEPOLLING=true
express-api:
build:
context: ./server
dockerfile: Dockerfile
ports:
- '3001:3001'
restart: on-failure
container_name: express-api
volumes:
- /app/node_modules # Inside the container, don't try to override this folder, just leave as is
- ./server:/app # Look at the server directory and copy everything into the app folder in the container
environment:
- PGUSER=${PGUSER}
- PGHOST=${PGHOST}
- PGDATABASE=${PGDATABASE}
- PGPASSWORD=${PGPASSWORD}
- PGPORT=${PGPORT}