-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
78 lines (78 loc) · 2.06 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
# production configuration. See docker-compose.override.yml from development specific configurations
version: '3.6'
services:
nginx:
image: nginx:stable-alpine
ports:
- "80:80"
- "443:443"
restart: on-failure
volumes:
- ./nginx/html:/usr/share/nginx/html:ro
postgres:
image: postgres:11-alpine
restart: always
expose:
- "5432"
# ports:
# - "5432:5432"
environment:
POSTGRES_DB: ${PG_DATABASE}
POSTGRES_USER: ${PG_USERNAME}
POSTGRES_PASSWORD: ${PG_PASSWORD}
PGDATA: /var/lib/postgresql/data/pgdata
volumes:
- ./postgres:/var/lib/postgresql/data
pgadmin:
image: dpage/pgadmin4:4.3
restart: always
depends_on:
- postgres
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_DEFAULT_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_DEFAULT_PASSWORD}
volumes:
- ./pgadmin:/var/lib/pgadmin
graphql-engine:
image: hasura/graphql-engine:v1.0.0-alpha41
ports:
- "4000:8080"
depends_on:
- "postgres"
- "business-logic"
restart: always
environment:
HASURA_GRAPHQL_DATABASE_URL: postgres://${PG_USERNAME}:${PG_PASSWORD}@postgres:5432/${PG_DATABASE}
HASURA_GRAPHQL_ENABLE_CONSOLE: "false"
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_UNAUTHORIZED_ROLE: anonymous
HASURA_GRAPHQL_JWT_SECRET: |
{
"type": "HS256",
"key": "${AUTH_JWT_SECRET}",
"claims_namespace": "x-hasura",
"claims_format": "json"
}
business-logic:
image: business-logic:prod
build:
context: ./business-logic
args:
NODE_ENV: production
ports:
- "3000:3000"
restart: always
environment:
NODE_ENV: production
PGHOST: postgres
PGUSER: ${PG_USERNAME}
PGDATABASE: ${PG_DATABASE}
PGPASSWORD: ${PG_PASSWORD}
PGPORT: 5432
AUTH_JWT_SECRET: ${AUTH_JWT_SECRET}
depends_on:
- postgres
volumes:
- ./business-logic/files:/usr/app/files