-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yaml
105 lines (96 loc) · 2.78 KB
/
docker-compose.prod.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
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
version: '3.6'
services:
postgres:
restart: always
image: postgres:12
ports:
- ${PG_PORT}:${PG_PORT}
command: -p ${PG_PORT}
environment:
POSTGRES_PASSWORD: ${PG_PASSWORD}
volumes:
- db_data:/var/lib/postgresql/data
redis:
restart: always
image: redis
ports:
- ${REDIS_PORT}:${REDIS_PORT}
command: redis-server --port ${REDIS_PORT} --requirepass ${REDIS_PASS}
volumes:
- redis-data:/data
hasura:
restart: always
image: hasura/graphql-engine:v1.2.2
ports:
- ${HASURA_GRAPHQL_SERVER_PORT}:${HASURA_GRAPHQL_SERVER_PORT}
environment:
HASURA_GRAPHQL_SERVER_PORT: ${HASURA_GRAPHQL_SERVER_PORT}
HASURA_GRAPHQL_DATABASE_URL: postgres://postgres:${PG_PASSWORD}@${PG_USER}:${PG_PORT}/${PG_DB_NAME}
HASURA_GRAPHQL_ENABLE_CONSOLE: "true" # set to "false" to disable console
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ENABLE_TELEMETRY: "false"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_LIVE_QUERIES_MULTIPLEXED_REFETCH_INTERVAL: ${HASURA_GRAPHQL_RATE_LIMIT}
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_ACTION_SECRET: ${HASURA_GRAPHQL_ACTION_SECRET}
HASURA_GRAPHQL_AUTH_HOOK: ${HASURA_GRAPHQL_AUTH_HOOK}
depends_on:
- postgres
- api
api:
restart: always
build:
context: .
dockerfile: ./api/Dockerfile.dev
volumes:
- ./api/:/app/
environment:
API_PORT: ${API_PORT}
API_DEBUG_PORT: ${API_DEBUG_PORT}
API_STEAM_REALM: ${API_STEAM_REALM}
API_STEAM_API_KEY: ${API_STEAM_API_KEY}
API_SESSIONS_SECRET_KEY: ${API_SESSIONS_SECRET_KEY}
PG_DB_NAME: ${PG_DB_NAME}
PG_HOST: ${PG_HOST}
PG_PORT: ${PG_PORT}
PG_USER: ${PG_USER}
PG_PASSWORD: ${PG_PASSWORD}
REDIS_HOST: ${REDIS_HOST}
REDIS_PASS: ${REDIS_PASS}
REDIS_PORT: ${REDIS_PORT}
ports:
- ${API_PORT}:${API_PORT}
- ${API_DEBUG_PORT}:${API_DEBUG_PORT}
depends_on:
- postgres
- redis
html:
restart: always
build:
context: .
dockerfile: ./html/Dockerfile.dev
ports:
- ${HTML_ADMIN_PORT}:${HTML_ADMIN_PORT}
- ${HTML_PUBLIC_PORT}:${HTML_PUBLIC_PORT}
volumes:
- ./html/:/app/
environment:
HTML_ADMIN_PORT: ${HTML_ADMIN_PORT}
HTML_PUBLIC_PORT: ${HTML_PUBLIC_PORT}
nginx:
restart: always
build:
context: .
dockerfile: ./nginx/Dockerfile.dev
ports:
- ${NGINX_HTTP_PORT}:${NGINX_HTTP_PORT}
- ${NGINX_HTTPS_PORT}:${NGINX_HTTPS_PORT}
volumes:
- ./nginx/conf.dev/:/etc/nginx/conf.d/
- ./nginx/logs/:/var/log/nginx/
depends_on:
- api
- html
volumes:
db_data:
redis-data: