-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
123 lines (106 loc) · 3.68 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
x-climtech-variables: &climtech-variables
ALLOWED_HOSTS: ${ALLOWED_HOSTS:-*}
APP_NAME: ${APP_NAME:-ClimTech}
# database
DB_USER: ${DB_USER:-wagtailorg}
DB_NAME: ${DB_NAME:-wagtailorg}
DB_PASSWORD: ${DB_PASSWORD:-wagtailorg}
# basic auth
BASIC_AUTH_ENABLED: ${BASIC_AUTH_ENABLED:-False}
BASIC_AUTH_LOGIN: ${BASIC_AUTH_LOGIN:-climtech}
BASIC_AUTH_PASSWORD: ${BASIC_AUTH_PASSWORD:-showmeclimtech}
BASIC_AUTH_WHITELISTED_PATHS: ${BASIC_AUTH_WHITELISTED_PATHS:-}
BASIC_AUTH_WHITELISTED_HTTP_HOST: ${BASIC_AUTH_WHITELISTED_HTTP_HOST:-}
# aws
AWS_STORAGE_BUCKET_NAME: ${AWS_STORAGE_BUCKET_NAME:-}
AWS_S3_SIGNATURE_VERSION: ${AWS_S3_SIGNATURE_VERSION:-s3v4}
AWS_S3_ENDPOINT_URL: ${AWS_S3_ENDPOINT_URL:-}
AWS_S3_REGION_NAME: ${AWS_S3_REGION_NAME:-}
AWS_S3_CUSTOM_DOMAIN: ${AWS_S3_CUSTOM_DOMAIN:-}
# cache
CACHE_CONTROL_S_MAXAGE: ${CACHE_CONTROL_S_MAXAGE:-600}
CACHE_CONTROL_STALE_WHILE_REVALIDATE: ${CACHE_CONTROL_STALE_WHILE_REVALIDATE:-30}
# sitewide alert
SITEWIDE_ALERT_MAXAGE: ${SITEWIDE_ALERT_MAXAGE:-300}
SITEWIDE_ALERT_SMAXAGE: ${SITEWIDE_ALERT_SMAXAGE:-604800}
# redis
REDIS_URL: ${REDIS_URL:-}
REDIS_TLS_URL: ${REDIS_TLS_URL:-}
# smtp
EMAIL_HOST: ${EMAIL_HOST:-}
EMAIL_PORT: ${EMAIL_PORT:-}
EMAIL_HOST_USER: ${EMAIL_HOST_USER:-}
EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD:-}
EMAIL_USE_TLS: ${EMAIL_USE_TLS:-False}
EMAIL_USE_SSL: ${EMAIL_USE_SSL:-False}
EMAIL_SUBJECT_PREFIX: ${EMAIL_SUBJECT_PREFIX:-Climweb}
SERVER_EMAIL: ${SERVER_EMAIL:-} #default from email
MODERATION_NOTIFY_SUPERUSERS: ${MODERATION_NOTIFY_SUPERUSERS:-}
# HSTS header activation
SECURE_HSTS_SECONDS: ${SECURE_HSTS_SECONDS:-}
# Content Security policy settings
CSP_DEFAULT_SRC: ${CSP_DEFAULT_SRC:-}
CSP_SCRIPT_SRC: ${CSP_SCRIPT_SRC:-}
CSP_STYLE_SRC: ${CSP_STYLE_SRC:-}
CSP_IMG_SRC: ${CSP_IMG_SRC:-}
CSP_CONNECT_SRC: ${CSP_CONNECT_SRC:-}
CSP_FONT_SRC: ${CSP_FONT_SRC:-}
CSP_BASE_URI: ${CSP_BASE_URI:-}
CSP_OBJECT_SRC: ${CSP_OBJECT_SRC:-}
# Referrer-policy header settings
SECURE_REFERRER_POLICY: ${SECURE_REFERRER_POLICY:-no-referrer-when-downgrade}
# pattern library
PATTERN_LIBRARY_ENABLED: ${PATTERN_LIBRARY_ENABLED:-false}
# github integration
GITHUB_ROADMAP_ACCESS_TOKEN: ${GITHUB_ROADMAP_ACCESS_TOKEN:-}
# mailchimp
MAILCHIMP_NEWSLETTER_ID: ${MAILCHIMP_NEWSLETTER_ID:-}
MAILCHIMP_ACCOUNT_ID: ${MAILCHIMP_ACCOUNT_ID:-}
# tracking
FB_APP_ID: ${FB_APP_ID:-}
GOOGLE_TAG_MANAGER_ID: ${GOOGLE_TAG_MANAGER_ID:-}
services:
web:
container_name: climtech_web
build:
context: .
target: dev
init: true
# This command just starts the container and keeps it running.
# To run a command within the container run docker-compose exec web <command>
# A Makefile task exists that starts a development server in the container: make runserver
command: tail -f /dev/null
environment:
<<: *climtech-variables
DJANGO_SETTINGS_MODULE: climtech.settings.dev
DATABASE_URL: postgis://${DB_USER}:${DB_PASSWORD}@db:5432/${DB_NAME}
PRIMARY_HOST: localhost:8000
ports:
- 8000:8000
volumes:
- .:/app/
depends_on:
db:
condition: service_healthy
db:
container_name: climtech_db
image: postgis/postgis:15-master
expose:
- 5432
environment:
POSTGRES_DB: ${DB_NAME}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
PGDATABASE: ${DB_NAME}
PGUSER: ${DB_USER}
PGPASSWORD: ${DB_PASSWORD}
POSTGRES_HOST_AUTH_METHOD: trust
logging:
driver: none
volumes:
- .:/app:ro
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U wagtailorg']
interval: 5s
timeout: 5s
retries: 5