This repository has been archived by the owner on Jan 16, 2024. It is now read-only.
forked from GhostManager/Ghostwriter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
production.yml
146 lines (139 loc) · 4.76 KB
/
production.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
version: "3"
volumes:
production_postgres_data: {}
production_postgres_data_backups: {}
production_staticfiles: {}
production_data: {}
services:
django: &django
build:
context: .
dockerfile: ./compose/production/django/Dockerfile
image: ghostwriter_production_django
restart: unless-stopped
depends_on:
- postgres
- redis
labels:
name: ghostwriter_django
environment:
- USE_DOCKER=${USE_DOCKER}
- IPYTHONDIR=${IPYTHONDIR}
- 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_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_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE}
- 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}
- MAILGUN_API_KEY=${DJANGO_MAILGUN_API_KEY}
- MAILGUN_DOMAIN=${DJANGO_MAILGUN_DOMAIN}
- 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}
command: /start
volumes:
- production_staticfiles:/app/staticfiles
- production_data:/app/ghostwriter/media
postgres:
build:
context: .
dockerfile: ./compose/production/postgres/Dockerfile
image: ghostwriter_production_postgres
restart: unless-stopped
volumes:
- production_postgres_data:/var/lib/postgresql/data
- production_postgres_data_backups:/backups
labels:
name: ghostwriter_postgres
environment:
- POSTGRES_DB=${POSTGRES_DB}
- POSTGRES_HOST=${POSTGRES_HOST}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_PORT=${POSTGRES_PORT}
- POSTGRES_USER=${POSTGRES_USER}
ports:
- "${POSTGRES_PORT}:5432"
nginx:
build: ./compose/production/nginx
image: ghostwriter_production_nginx
restart: unless-stopped
depends_on:
- django
volumes:
- production_data:/app/media
- production_staticfiles:/app/staticfiles
- ./compose/production/nginx/nginx.conf:/etc/nginx/nginx.conf
- ./ssl:/ssl
labels:
name: ghostwriter_nginx
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
redis:
build:
context: .
dockerfile: ./compose/production/redis/Dockerfile
image: ghostwriter_production_redis
labels:
name: ghostwriter_redis
restart: unless-stopped
queue:
<<: *django
image: ghostwriter_production_queue
restart: unless-stopped
depends_on:
- redis
- postgres
- django
ports: []
labels:
name: ghostwriter_queue
command: /start-queue
graphql_engine:
build:
context: .
dockerfile: ./compose/production/hasura/Dockerfile
image: ghostwriter_production_graphql
depends_on:
- postgres
- django
restart: always
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://${NGINX_HOST}:${NGINX_PORT}/api
- HASURA_ACTION_SECRET=${HASURA_GRAPHQL_ACTION_SECRET}
- HASURA_GRAPHQL_ADMIN_SECRET=${HASURA_GRAPHQL_ADMIN_SECRET}
- HASURA_GRAPHQL_AUTH_HOOK=http://${NGINX_HOST}:${NGINX_PORT}/api/webhook
- 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}