-
Notifications
You must be signed in to change notification settings - Fork 12
/
docker-compose.yaml
49 lines (47 loc) · 1.38 KB
/
docker-compose.yaml
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
version: "3"
services:
web:
command: bash -c "python3 manage.py migrate && python3 manage.py runserver 0.0.0.0:8000"
build: .
ports:
- "8000:8000"
tty: true
depends_on:
- db
environment:
DEBUG: 1
DATABASE_URL: postgresql://postgres:postgres@db:5432/pycon
SECRET_KEY: "django-insecure-gijk%bb1-ss)p92h0(-ai2l4!j44vsjs+4ez+^v-f=k!&dtwh8"
EXTRA_ALLOWED_HOSTS: "localhost"
PRETALX_TOKEN: "${PRETALX_TOKEN}"
volumes:
- .:/code
db:
image: postgres:14
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: pycon
ports:
- "5433:5432"
# Entry for OG image generator.
# Should be run as one-off tool, does not start automatically because of the profile entry.
og_generator:
profiles: ["tools"]
command: bash -c "rm -rf data/mediafiles/og-images/talks data/mediafiles/og-images/workshops && cp static/generated/index.css templates && python3 manage.py program_generate_og_images && rm templates/index.css"
build:
context: .
dockerfile: og-generator.dockerfile
tty: true
depends_on:
- db
environment:
DEBUG: 1
DATABASE_URL: postgresql://postgres:postgres@db:5432/pycon
SECRET_KEY: "required-but-not-used"
volumes:
- .:/code
volumes:
postgres_data: