/
docker-compose.yml
56 lines (51 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
49
50
51
52
53
54
55
56
version: '3.7'
x-api-environment:
&api-environment
environment:
- PORT=80
- APP_ENV=development
- APP_CONFIG=config.development
- DATABASE_URL=postgres://postgres:@postgres:5432/postgres
build:
context: ./api
dockerfile: Dockerfile
volumes:
- type: bind
source: ./api
target: /app
depends_on:
- postgres
x-frontend-environment:
&frontend-environment
environment:
- HOST=0.0.0.0
- PORT=80
- NODE_ENV=development
- WEBSITE_ORIGIN=http://0.0.0.0:9000
- API_URL=http://0.0.0.0:8000/api/
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- type: bind
source: ./frontend/src
target: /app/src
depends_on:
- postgres
services:
postgres:
image: postgres:alpine
api:
<<: *api-environment
restart: always
image: api
ports:
- "8000:80"
command: /start-reload.sh
frontend:
<<: *frontend-environment
restart: always
image: frontend
ports:
- "9000:80"
command: yarn dev