-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
66 lines (65 loc) · 1.7 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
version: '3.3'
services:
api: &api
build:
context: backend/
dockerfile: Dockerfile
environment:
DB_URL: 'postgresql+psycopg2://osmybiz:123456@database:5432/osmybiz'
volumes:
- ./backend/api:/opt/backend
links:
- database:database
api-migrate:
<<: *api
command: ["python", "manage.py", "db", "upgrade"]
database:
image: postgres
environment:
- POSTGRES_USER=osmybiz
- POSTGRES_PASSWORD=123456
- POSTGRES_DB=osmybiz
ports:
- "54333:5432"
frontend:
build:
context: frontend/
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
OSM_URL: 'https://master.apis.dev.openstreetmap.org'
OSM_API_URL: 'https://master.apis.dev.openstreetmap.org'
# OSM_URL: 'https://www.openstreetmap.org'
# OSM_API_URL: 'https://api.openstreetmap.org'
API_URL: '/api/'
env_file:
- .env-openstreetmap-dev
volumes:
- ./frontend/osmybiz:/opt/frontend
- node_modules:/opt/frontend/node_modules
- config:/opt/frontend/.config
- gyp:/opt/frontend/.node-gyp
- npm:/opt/frontend/.npm
# use the following instead of the above `frontend` to test deployment builds
# and be sure to run `npm run build` beforehand in the frontend/osmybiz directory
# frontend:
# image: geometalab/osmybiz-frontend:osmybiz.sifs0003.infs.ch_staging
# volumes:
# - ./frontend/osmybiz/dist:/var/www
nginx:
build:
context: nginx/
dockerfile: Dockerfile.local
ports:
- "8089:443"
environment:
- VIRTUAL_HOST=localhost,127.0.0.1
links:
- "api:backend"
- "frontend:frontend"
volumes:
node_modules: {}
config: {}
gyp: {}
npm: {}