-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
77 lines (72 loc) · 2.03 KB
/
Copy pathdocker-compose.yaml
File metadata and controls
77 lines (72 loc) · 2.03 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
services:
init-key:
image: m.daocloud.io/docker.io/alpine/openssl
container_name: init-key
restart: no
entrypoint:
- sh
command:
- -c
- |-
if [ -f /tmp/key/opencidn.key ] && [ -f /tmp/key/opencidn.pub ]; then
echo "Key files already exist, skipping generation"
exit 0
fi
openssl genrsa -out /tmp/key/opencidn.key 2048
openssl rsa -in /tmp/key/opencidn.key -pubout -out /tmp/key/opencidn.pub
# TODO: remove that convert to pkcs1
openssl rsa -in /tmp/key/opencidn.key -out /tmp/key/opencidn.key -traditional
openssl rsa -pubin -in /tmp/key/opencidn.pub -out /tmp/key/opencidn.pub -RSAPublicKey_out
volumes:
- ./key/:/tmp/key/
db-auth:
image: m.daocloud.io/docker.io/library/mysql:9.3.0
container_name: db-auth
restart: unless-stopped
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: example
MYSQL_DATABASE: auth
swaggerui-auth:
image: m.daocloud.io/docker.io/swaggerapi/swagger-ui:v5.18.2
container_name: swaggerui-auth
restart: unless-stopped
ports:
- 8000:8080
environment:
SWAGGER_JSON_URL: http://localhost:8081/swagger.json
auth:
image: m.daocloud.io/ghcr.io/opencidn/opencidn/auth:v0.0.9
container_name: auth
depends_on:
db-auth:
condition: service_started
init-key:
condition: service_completed_successfully
restart: unless-stopped
ports:
- 8081:8081
command:
- --address=:8081
- --db-url
- root:example@tcp(db-auth:3306)/auth?charset=utf8mb4&parseTime=True
- --token-private-key-file
- /tmp/key/opencidn.key
volumes:
- ./key/:/tmp/key/:ro
gateway:
image: m.daocloud.io/ghcr.io/opencidn/opencidn/gateway:v0.0.9
container_name: gateway
ports:
- 8080:8080
command:
- --address=:8080
- --default-registry
- docker.io
- --token-public-key-file
- /tmp/key/opencidn.pub
- --token-url
- http://localhost:8081/auth/token
volumes:
- ./key/:/tmp/key/:ro