-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
43 lines (41 loc) · 1 KB
/
docker-compose.yaml
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
version: "3"
services:
frontend:
build: frontend
depends_on:
- server
environment:
CI: "true" # allows create-react-app to run inside docker
REACT_APP_API_URL: "http://localhost:3100"
ports:
- "3000:3000"
- "35729:35729" # exposes websocket for live reload
command: yarn start
volumes:
- ./frontend:/app/
- /app/node_modules
server:
build: server
depends_on:
- postgres
environment:
DATABASE_URL: postgres://user:pass@postgres:5432/db
NODE_ENV: development
PORT: 3100
ports:
- "3100:3100"
command: npm run dev
volumes:
- ./server:/app/
- /app/node_modules
postgres:
image: postgres:10.4
ports:
- "35432:5432"
environment:
- POSTGRES_MULTIPLE_DATABASES="db","db_test"
- POSTGRES_USER=user
- POSTGRES_PASSWORD=pass
volumes:
- ./docker-postgresql-multiple-databases:/docker-entrypoint-initdb.d
- ./postgres-data:/var/lib/postgresql/data