forked from mysociety/local-intelligence-hub
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
63 lines (62 loc) · 1.62 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
services:
db:
image: kartoza/postgis:16-3
restart: always
volumes:
- .:/app
- pgdata:/var/lib/postgresql
environment:
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'password'
POSTGRES_DB: 'postgres'
POSTGRES_PORT: 5432
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres -h 127.0.0.1"]
interval: 5s
timeout: 5s
retries: 5
working_dir: /app
ports:
- "53333:5432"
- "8000:8000"
web:
image: mysociety/local-intelligence-hub:${TAG:-latest}
build: .
command: .venv/bin/python manage.py runserver 0.0.0.0:8000
volumes:
- .:/app
depends_on:
db:
condition: service_healthy
tty: true
environment:
SECRET_KEY: 'secret'
DEBUG: 1
DATABASE_URL: 'postgis://postgres:password@db/postgres'
EMAIL_HOST: email.svc
CACHE_FILE: 'data/cache'
MAPIT_URL: 'https://mapit.mysociety.org/'
GOOGLE_ANALYTICS: ${GOOGLE_ANALYTICS:-}
GOOGLE_SITE_VERIFICATION: ${GOOGLE_SITE_VERIFICATION:-}
DJANGO_SUPERUSER_USERNAME: 'admin'
DJANGO_SUPERUSER_PASSWORD: 'password'
DJANGO_SUPERUSER_EMAIL: 'admin@localhost'
working_dir: /app
# Runs app on the same network as the database container,
# allows "forwardPorts" in devcontainer.json function
# so that mtxr.sqltools and third party DB clients can access it
network_mode: service:db
mailhog:
image: mailhog/mailhog:v1.0.1
restart: always
ports:
- 1025:1025
- 8025:8025
networks:
default:
aliases:
- email.svc
volumes:
pgdata:
build:
node_modules: