-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
162 lines (149 loc) · 3.88 KB
/
docker-compose.yaml
File metadata and controls
162 lines (149 loc) · 3.88 KB
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
services:
dev-http: &dev
build:
dockerfile: Dockerfile
context: .
target: dev
env_file: local.env
environment:
APP_NAME: "bootstrap-fastapi"
ports:
- '8000:8000'
working_dir: "/app/src"
volumes:
- '.:/app'
depends_on:
- redis
- otel-collector
command:
- python
- ./http_app/dev_server.py
dev-socketio:
<<: *dev
environment:
APP_NAME: "bootstrap-socketio"
ports:
- '8001:8001'
command:
- python
- ./socketio_app/dev_server.py
#########################
#### Helper services ####
#########################
jaeger:
image: jaegertracing/all-in-one:latest
ports:
- "6831:6831/udp" # UDP port for Jaeger agent
- "16686:16686" # Web UI
- "14268:14268" # HTTP port for spans
otel-collector:
image: grafana/alloy:latest
# You can add the Grafana Cloud credentials in this file
# and push observability directly to the provider.
# Refer to the config.alloy file to see what credentials we need.
env_file:
- path: ./credentials.env
required: false
depends_on:
- jaeger
ports:
- "12345:12345"
volumes:
- ./config.alloy:/etc/alloy/config.alloy
command:
- run
- --server.http.listen-addr=0.0.0.0:12345
- --stability.level=experimental
# - --stability.level=public-preview
- /etc/alloy/config.alloy
redis:
image: redis
dramatiq-worker:
<<: *dev
environment:
APP_NAME: "bootstrap-dramatiq-worker"
ports: []
command:
- dramatiq
- --watch
- .
- -p
- "1"
- -t
- "1"
- dramatiq_worker
#################################
#### Authentication services ####
#################################
kratos-migrate:
image: oryd/kratos:v1.3.1
environment:
DSN: "sqlite:///etc/config/kratos/db.sqlite?_fk=true&mode=rwc"
volumes:
- ./auth_volumes/kratos:/etc/config/kratos
command: -c /etc/config/kratos/kratos.yml migrate sql -e --yes
restart: on-failure
kratos:
depends_on:
- kratos-migrate
image: oryd/kratos:v1.3.1
# It's not needed to expose these, leaving for documentation
# ports:
# - '4433:4433' # public API
# - '4434:4434' # admin API
restart: unless-stopped
environment:
DSN: "sqlite:///etc/config/kratos/db.sqlite?_fk=true&mode=rwc"
LOG_LEVEL: "trace"
volumes:
- ./auth_volumes/kratos:/etc/config/kratos
command: serve -c /etc/config/kratos/kratos.yml --dev --watch-courier
auth-ui:
image: oryd/kratos-selfservice-ui-node:v1.3.1
environment:
PORT: 3000
# Internal access URL for the BFF instance
KRATOS_PUBLIC_URL: "http://kratos:4433/"
# External access URL for the browser
KRATOS_BROWSER_URL: "http://127.0.0.1:8080/.ory/kratos/public"
JWKS_URL: "http://oathkeeper:4456/.well-known/jwks.json"
SECURITY_MODE: "jwks"
COOKIE_SECRET: "changeme"
CSRF_COOKIE_NAME: "ory_csrf_ui"
CSRF_COOKIE_SECRET: "changeme"
restart: on-failure
# mailslurper:
# image: oryd/mailslurper:latest-smtps
# ports:
# - '4436:4436'
# - '4437:4437'
oathkeeper:
image: oryd/oathkeeper:v0.40.9
depends_on:
- kratos
- auth-ui
- dev-http
ports:
# Public traffic port
- "8080:4455"
# Private traffic port, this is not usually exposed
# among other things it provides the JWKS url
# - "4456:4456"
command:
serve proxy -c "/etc/config/oathkeeper/oathkeeper.yml"
restart: on-failure
volumes:
- ./auth_volumes/oathkeeper:/etc/config/oathkeeper
##########################
#### One-off commands ####
##########################
test:
build:
dockerfile: Dockerfile
context: .
target: dev
volumes:
- '.:/app'
command:
- "make"
- "test"