-
Notifications
You must be signed in to change notification settings - Fork 190
/
local.yml
157 lines (152 loc) · 5.87 KB
/
local.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
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
volumes:
local_postgres_data: {}
local_postgres_data_backups: {}
local_data: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/local/django/Dockerfile
image: ghostwriter_local_django
depends_on:
- postgres
volumes:
- .:/app
- local_data:/app/ghostwriter/media
labels:
name: ghostwriter_django
environment:
- USE_DOCKER=${USE_DOCKER}
- IPYTHONDIR=${IPYTHONDIR}
- DJANGO_2FA_ALWAYS_REVEAL_BACKUP_TOKENS=${DJANGO_2FA_ALWAYS_REVEAL_BACKUP_TOKENS}
- DJANGO_ACCOUNT_ALLOW_REGISTRATION=${DJANGO_ACCOUNT_ALLOW_REGISTRATION}
- DJANGO_ACCOUNT_EMAIL_VERIFICATION=${DJANGO_ACCOUNT_EMAIL_VERIFICATION}
- DJANGO_ADMIN_URL=${DJANGO_ADMIN_URL}
- DJANGO_ALLOWED_HOSTS=${DJANGO_ALLOWED_HOSTS}
- DJANGO_CSRF_TRUSTED_ORIGINS=${DJANGO_CSRF_TRUSTED_ORIGINS}
- DJANGO_DATE_FORMAT=${DJANGO_DATE_FORMAT}
- DJANGO_JWT_SECRET_KEY=${DJANGO_JWT_SECRET_KEY}
- DJANGO_QCLUSTER_NAME=${DJANGO_QCLUSTER_NAME}
- DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}
- DJANGO_SECURE_SSL_REDIRECT=${DJANGO_SECURE_SSL_REDIRECT}
- DJANGO_SESSION_COOKIE_AGE=${DJANGO_SESSION_COOKIE_AGE}
- DJANGO_SESSION_EXPIRE_AT_BROWSER_CLOSE=${DJANGO_SESSION_EXPIRE_AT_BROWSER_CLOSE}
- DJANGO_SESSION_SAVE_EVERY_REQUEST=${DJANGO_SESSION_SAVE_EVERY_REQUEST}
- DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
- DJANGO_SOCIAL_ACCOUNT_ALLOW_REGISTRATION=${DJANGO_SOCIAL_ACCOUNT_ALLOW_REGISTRATION}
- DJANGO_SOCIAL_ACCOUNT_DOMAIN_ALLOWLIST=${DJANGO_SOCIAL_ACCOUNT_DOMAIN_ALLOWLIST}
- DJANGO_SOCIAL_ACCOUNT_LOGIN_ON_GET=${DJANGO_SOCIAL_ACCOUNT_LOGIN_ON_GET}
- DJANGO_SUPERUSER_EMAIL=${DJANGO_SUPERUSER_EMAIL}
- DJANGO_SUPERUSER_PASSWORD=${DJANGO_SUPERUSER_PASSWORD}
- DJANGO_SUPERUSER_USERNAME=${DJANGO_SUPERUSER_USERNAME}
- HASURA_ACTION_SECRET=${HASURA_GRAPHQL_ACTION_SECRET}
- HASURA_GRAPHQL_SERVER_HOSTNAME=${HASURA_GRAPHQL_SERVER_HOSTNAME}
- HEALTHCHECK_DISK_USAGE_MAX=${HEALTHCHECK_DISK_USAGE_MAX}
- HEALTHCHECK_MEM_MIN=${HEALTHCHECK_MEM_MIN}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_USER=${POSTGRES_USER}
- REDIS_URL=redis://${REDIS_HOST}:${REDIS_PORT}/0
- WEB_CONCURRENCY=${DJANGO_WEB_CONCURRENCY}
healthcheck:
test: curl --insecure --fail http://django:8000/status/simple/ || exit 1
interval: ${HEALTHCHECK_INTERVAL}
timeout: ${HEALTHCHECK_TIMEOUT}
retries: ${HEALTHCHECK_RETRIES}
start_period: ${HEALTHCHECK_START}
ports:
- "8000:8000"
command: /start
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: ghostwriter_local_postgres
volumes:
- local_postgres_data:/var/lib/postgresql/data
- local_postgres_data_backups:/backups
labels:
name: ghostwriter_postgres
environment:
- PGUSER=${POSTGRES_USER}
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_USER=${POSTGRES_USER}
healthcheck:
test: pg_isready -d $$POSTGRES_DB -U $$POSTGRES_USER
interval: ${HEALTHCHECK_INTERVAL}
timeout: ${HEALTHCHECK_TIMEOUT}
retries: ${HEALTHCHECK_RETRIES}
start_period: ${HEALTHCHECK_START}
ports:
- "${POSTGRES_PORT}:5432"
redis:
build:
context: .
dockerfile: ./compose/production/redis/Dockerfile
image: ghostwriter_local_redis
labels:
name: ghostwriter_redis
healthcheck:
test: redis-cli --raw incr ping || exit 1
interval: ${HEALTHCHECK_INTERVAL}
timeout: ${HEALTHCHECK_TIMEOUT}
retries: ${HEALTHCHECK_RETRIES}
start_period: ${HEALTHCHECK_START}
queue:
<<: *django
image: ghostwriter_local_queue
depends_on:
- redis
- postgres
labels:
name: ghostwriter_queue
ports: []
command: /start-queue
graphql_engine:
build:
context: .
dockerfile: ./compose/production/hasura/Dockerfile
image: ghostwriter_local_graphql
depends_on:
- postgres
- django
restart: unless-stopped
ports:
- "${HASURA_GRAPHQL_SERVER_PORT}:8080"
- "9691:9691"
volumes:
- ./hasura-docker/metadata:/metadata
logging:
driver: "json-file"
options:
max-file: "1"
max-size: "10m"
labels:
name: ghostwriter_graphql
environment:
- ACTIONS_URL_BASE=http://${DJANGO_HOST}:${DJANGO_PORT}/api
- HASURA_ACTION_SECRET=${HASURA_GRAPHQL_ACTION_SECRET}
- HASURA_GRAPHQL_ADMIN_SECRET=${HASURA_GRAPHQL_ADMIN_SECRET}
- HASURA_GRAPHQL_AUTH_HOOK=http://${DJANGO_HOST}:${DJANGO_PORT}/api/webhook
- HASURA_GRAPHQL_CONSOLE_ASSETS_DIR=/srv/console-assets
- HASURA_GRAPHQL_DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}
- HASURA_GRAPHQL_DEV_MODE=${HASURA_GRAPHQL_DEV_MODE}
- HASURA_GRAPHQL_ENABLE_CONSOLE=${HASURA_GRAPHQL_ENABLE_CONSOLE}
- HASURA_GRAPHQL_ENABLED_LOG_TYPES=${HASURA_GRAPHQL_ENABLED_LOG_TYPES}
- HASURA_GRAPHQL_ENABLE_TELEMETRY=${HASURA_GRAPHQL_ENABLE_TELEMETRY}
- HASURA_GRAPHQL_INSECURE_SKIP_TLS_VERIFY=${HASURA_GRAPHQL_INSECURE_SKIP_TLS_VERIFY}
- HASURA_GRAPHQL_LOG_LEVEL=${HASURA_GRAPHQL_LOG_LEVEL}
- HASURA_GRAPHQL_METADATA_DIR=${HASURA_GRAPHQL_METADATA_DIR}
- HASURA_GRAPHQL_MIGRATIONS_DIR=${HASURA_GRAPHQL_MIGRATIONS_DIR}
- HASURA_GRAPHQL_SERVER_PORT=${HASURA_GRAPHQL_SERVER_PORT}
healthcheck:
test: curl --insecure --fail http://graphql_engine:8080/healthz || exit 1
interval: ${HEALTHCHECK_INTERVAL}
timeout: ${HEALTHCHECK_TIMEOUT}
retries: ${HEALTHCHECK_RETRIES}
start_period: ${HEALTHCHECK_START}