-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
51 lines (48 loc) · 1.23 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
version: '3.7'
x-common-environment: &common-environment
DATABASE_URL: postgresql://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@db:5432/${POSTGRES_DB:-mydb}
DELAY_OSM: ${DELAY_OSM:-}
OSM_API_URL: ${OSM_API_URL:-}
OSM_API_KEY: ${OSM_API_KEY:-}
OSM_API_SECRET: ${OSM_API_SECRET:-}
OSM_USER: ${OSM_USER:-}
OSM_PASS: ${OSM_PASS:-}
OSM_LANG: ${OSM_LANG:-}
services:
web:
build:
context: .
dockerfile: docker/web/Dockerfile
depends_on:
- db
environment:
<<: *common-environment
PORT: ${WEB_PORT:-8080}
ports:
- "${WEB_PORT:-8080}:${WEB_PORT:-8080}"
restart: always
worker:
build:
context: .
dockerfile: docker/worker/Dockerfile
depends_on:
- db
environment:
<<: *common-environment
restart: always
db:
build:
context: .
dockerfile: docker/db/Dockerfile
volumes:
- pgdata:/data/postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
POSTGRES_DB: ${POSTGRES_DB:-mydb}
PGDATA: /data/postgres
ports:
- "5432:5432"
restart: always
volumes:
pgdata: