-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
109 lines (101 loc) · 2.83 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
version: '3.6'
services:
postgres:
container_name: postgres
image: postgres:12
restart: always
volumes:
- db_data:/var/lib/postgresql/data
- ./sql/create_tables.sql:/docker-entrypoint-initdb.d/create_tables.sql
environment:
POSTGRES_PASSWORD: postgrespassword
graphql-engine:
container_name: hasura
image: hasura/graphql-engine:v2.11.2.cli-migrations-v3
ports:
- "8080:8080"
depends_on:
- "postgres"
restart: always
environment:
HASURA_GRAPHQL_METADATA_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
PG_DATABASE_URL: postgres://postgres:postgrespassword@postgres:5432/postgres
HASURA_GRAPHQL_ENABLE_CONSOLE: "true"
HASURA_GRAPHQL_DEV_MODE: "true"
HASURA_GRAPHQL_ENABLED_LOG_TYPES: startup, http-log, webhook-log, websocket-log, query-log
HASURA_GRAPHQL_MIGRATIONS_SERVER_TIMEOUT: 10
HASURA_GRAPHQL_ADMIN_SECRET: myadminsecretkey
HASURA_GRAPHQL_AUTH_HOOK: http://host.docker.internal:2000/webhook
HASURA_GRAPHQL_AUTH_HOOK_MODE: GET
volumes:
- ./hasura/metadata:/hasura-metadata
refine:
container_name: refine
build:
context: .
dockerfile: ./docker/Dockerfile.refine
command: ["npm", "run", "start"]
ports:
- 3000:3000
depends_on:
- postgres
- graphql-engine
volumes:
- ./refine:/app/refine
- ./refine/node_modules:/app/refine/node_modules
webhook:
container_name: webhook
build:
context: .
dockerfile: ./docker/Dockerfile.webhook
command: ["npm", "run", "start"]
ports:
- 2000:2000
depends_on:
- graphql-engine
volumes:
- ./webhook:/app/webhook
- ./webhook/node_modules:/app/webhook/node_modules
kratos-migrate:
container_name: kratos_migrate
image: oryd/kratos:v0.10.1
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true&mode=rwc
volumes:
- type: volume
source: kratos-sqlite
target: /var/lib/sqlite
read_only: false
- type: bind
source: ./kratos
target: /etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
kratos:
container_name: kratos
image: oryd/kratos:v0.10.1
ports:
- "4433:4433" # public
- "4434:4434" # admin
restart: unless-stopped
depends_on:
- kratos-migrate
environment:
- DSN=sqlite:///var/lib/sqlite/db.sqlite?_fk=true
- LOG_LEVEL=trace
command:
serve -c /etc/config/kratos/kratos.yml --dev
volumes:
-
type: volume
source: kratos-sqlite
target: /var/lib/sqlite
read_only: false
-
type: bind
source: ./kratos
target: /etc/config/kratos
volumes:
db_data:
refinenodemodules:
kratos-sqlite: