-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
124 lines (116 loc) · 3.2 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
version: '3.6'
services:
postgres:
image: postgres:12
restart: always
volumes:
- db_data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
graphql-engine:
image: hasura/graphql-engine:v2.0.6.cli-migrations-v3
ports:
- "8082:8080"
depends_on:
- "postgres"
restart: always
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "false"
HASURA_GRAPHQL_EXPERIMENTAL_FEATURES: "inherited_roles"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_ADMIN_SECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
HASURA_GRAPHQL_MIGRATIONS_SERVER_TIMEOUT: 15
HASURA_GRAPHQL_MIGRATIONS_DIR: /data/hasura/migrations
HASURA_GRAPHQL_METADATA_DIR: /data/hasura/metadata
SAAS_DATABASE_URL: postgres://postgres:${POSTGRES_PASSWORD}@postgres:5432/postgres
HS_SUBSCRIPTION_BASE_URL: "http://hs-subscription:1340"
HS_SAAS_BASE_URL: "http://hs-saas:1340"
volumes:
- ${HASURA_SCHEMA_FOLDER}:/data/hasura
hs-subscription:
image: golang:1.16
working_dir: /app
depends_on:
- graphql-engine
volumes:
- ./go.mod:/app/go.mod:ro
- ./go.sum:/app/go.sum:ro
- ./config.yaml:/app/config.yaml:ro
- ./cmd/:/app/cmd/:ro
- ./pkg/:/app/pkg/:ro
environment:
SUBSCRIPTION.STRIPE.APIKEY: ${STRIPE_KEY}
SUBSCRIPTION.STRIPE.WEBHOOKSECRET: ${STRIPE_WEBHOOK_SECRET}
GRAPHQL.HASURA.ADMINSECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
GRAPHQL.URL: "http://graphql-engine:8080/v1/graphql"
LOGGER.LEVEL: "debug"
expose:
- "1340"
ports:
- "1341:1340"
command:
- "go"
- "run"
- "./cmd/subscription/main.go"
hs-rp:
image: golang:1.16
depends_on:
- graphql-engine
working_dir: /app
volumes:
- ./go.mod:/app/go.mod:ro
- ./go.sum:/app/go.sum:ro
- ./config.yaml:/app/config.yaml:ro
- ./cmd/:/app/cmd/:ro
- ./pkg/:/app/pkg/:ro
environment:
GRAPHQL.HASURA.ADMINSECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
GRAPHQL.URL: "http://graphql-engine:8080/v1/graphql"
LOGGER.LEVEL: "debug"
expose:
- "1340"
ports:
- "1342:1340"
command:
- "go"
- "run"
- "./cmd/rp/main.go"
hs-saas:
image: golang:1.16
depends_on:
- graphql-engine
working_dir: /app
volumes:
- ./go.mod:/app/go.mod:ro
- ./go.sum:/app/go.sum:ro
- ./config.yaml:/app/config.yaml:ro
- ./cmd/:/app/cmd/:ro
- ./pkg/:/app/pkg/:ro
environment:
GRAPHQL.HASURA.ADMINSECRET: ${HASURA_GRAPHQL_ADMIN_SECRET}
GRAPHQL.URL: "http://graphql-engine:8080/v1/graphql"
LOGGER.LEVEL: "debug"
expose:
- "1340"
ports:
- "1343:1340"
command:
- "go"
- "run"
- "./cmd/saas/main.go"
stripe-cli:
image: stripe/stripe-cli
depends_on:
- hs-subscription
environment:
STRIPE_API_KEY: ${STRIPE_KEY}
entrypoint:
- "/bin/stripe"
- "listen"
- "--forward-to"
- "hs-subscription:1340/webhook"
- "--latest"
volumes:
db_data: