forked from freedomofpress/securedrop.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
prod-docker-compose.yaml
60 lines (58 loc) · 1.53 KB
/
prod-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
50
51
52
53
54
55
56
57
58
59
60
---
version: "3"
networks:
app:
services:
postgresql:
image: postgres:9.6
ports:
- "5432"
volumes:
- ./devops/docker/postgres-scripts:/docker-entrypoint-initdb.d:ro
environment:
POSTGRES_PASSWORD: securedroppassword
POSTGRES_USER: securedrop
POSTGRES_DB: securedropdb
user: postgres
networks:
app:
aliases:
- db
django:
build:
context: .
dockerfile: devops/docker/ProdDjangoDockerfile
args:
USERID: 12345
image: quay.io/freedomofpress/securedroporg
depends_on:
- postgresql
working_dir: /django
volumes:
- ${HOST_STATIC_DIR:-sdorg-django-media}:/django-media
- ${HOST_MEDIA_DIR:-sdorg-django-static}:/django-static
environment:
DJANGO_ALLOWED_HOSTS: app localhost
DJANGO_APP_NAME: securedrop
DJANGO_COLLECT_STATIC: "yes"
DJANGO_SETTINGS_MODULE: securedrop.settings.production
# Arbitrary key for this "prod-like" testing setup. Do not use in real life.
DJANGO_SECRET_KEY: 64a235ef65834d8b42fa2802dd4290cf61c773c3f31332039ec5c48165f744da
DJANGO_DB_PASSWORD: securedroppassword
DJANGO_DB_USER: securedrop
DJANGO_DB_NAME: securedropdb
DJANGO_DB_PORT: 5432
DJANGO_DB_HOST: db
DJANGO_STATIC_ROOT: /django-static
DJANGO_MEDIA_ROOT: /django-media
DEPLOY_ENV: prod
DJANGO_WHITENOISE: 'True'
ports:
- "8000:8000"
networks:
app:
aliases:
- app
volumes:
sdorg-django-static:
sdorg-django-media: