-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
74 lines (70 loc) · 2.07 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
67
68
69
70
71
72
73
74
# As of yet, more modern compose file versions (v3) do not support waiting for another container to be "healthy"
# version : "2.4"
services:
database:
image: postgis/postgis:12-3.1
environment:
- POSTGRES_USER=iow-boundary-tool
- POSTGRES_PASSWORD=iow-boundary-tool
- POSTGRES_DB=iow-boundary-tool
healthcheck:
test: [ "CMD", "pg_isready", "-U", "iow-boundary-tool", "-h", "database" ]
interval: 3s
timeout: 3s
retries: 6
app:
image: node:18-slim
stdin_open: true
working_dir: /usr/local/src
environment:
- REACT_APP_GIT_COMMIT=${REACT_APP_GIT_COMMIT:-latest}
- CHOKIDAR_USEPOLLING=true
- CHOKIDAR_INTERVAL=100
- PORT=4545
- NODE_OPTIONS=--openssl-legacy-provider
volumes:
- ./src/app:/usr/local/src
- ./src/django/static:/usr/local/src/build
# Ensure node_modules cache doesn't clash with other jobs on CI.
- node-modules-volume:/usr/local/src/node_modules
command: yarn start
django:
image: iow-django
environment:
- AWS_PROFILE=${AWS_PROFILE:-iow-boundary-tool}
- POSTGRES_HOST=database
- POSTGRES_PORT=5432
- POSTGRES_USER=iow-boundary-tool
- POSTGRES_PASSWORD=iow-boundary-tool
- POSTGRES_DB=iow-boundary-tool
- DJANGO_ENV=Development
- DJANGO_SECRET_KEY=secret
- DJANGO_LOG_LEVEL=INFO
- DJANGO_ALLOWED_HOSTS=localhost,django
- IOW_TILES_HOST=${IOW_TILES_HOST:-tiles.staging.iow.azavea.com}
build:
context: ./src/django
dockerfile: Dockerfile
volumes:
- ./src/django:/usr/local/src
- $HOME/.aws:/root/.aws:ro
working_dir: /usr/local/src
command:
- "-b :8181"
- "--workers=2"
- "--reload"
- "--timeout=90"
- "--access-logfile=-"
- "--error-logfile=-"
- "--log-level=debug"
- "iow.wsgi"
depends_on:
database:
condition: service_healthy
shellcheck:
image: koalaman/shellcheck:stable
volumes:
- ./:/usr/local/src
working_dir: /usr/local/src
volumes:
node-modules-volume: