Repository navigation
Expand file tree
/
Copy pathcompose.yml
More file actions
150 lines (142 loc) · 3.74 KB
/
Copy pathcompose.yml
File metadata and controls
150 lines (142 loc) · 3.74 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
services:
karon:
build:
dockerfile: Dockerfile.dev
ports:
- "8080:8080"
environment:
TZ: Europe/Stockholm
APP_SECRET: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
DATABASE_URL: postgresql://karon:karon@db:5432/karon
HIVE_API_URL: http://nyckeln:7004/api/v1
HIVE_API_KEY: secret
SECRET_KEY: secret
SSO_URL: http://nyckeln:7003
OIDC_PROVIDER: http://localhost:7003
OIDC_CLIENT_ID: client-id
OIDC_CLIENT_SECRET: client-secret
OIDC_REDIRECT_URL: http://localhost:8080/auth/callback
RUST_LOG: info,karon=debug,actix-ws=trace
VOTEIT_URL: http://voteit:5000
PORT: 8080
configs:
- source: nginx.conf
target: /etc/nginx/nginx.conf
develop:
watch:
- path: ./src
action: rebuild
- path: ./templates
action: rebuild
- path: ./locales
action: rebuild
- path: ./migrations
action: rebuild
- path: ./Cargo.*
action: rebuild
- path: ./static
action: sync
target: /karon/static
depends_on:
db:
condition: service_healthy
db:
image: docker.io/library/postgres:latest
ports:
- "127.0.0.1:5432:5432"
volumes:
- karon-db-data:/data/db
environment:
POSTGRES_USER: karon
POSTGRES_PASSWORD: karon
POSTGRES_DB: karon
PG_DATA: /data/db
healthcheck:
test: ["CMD", "pg_isready", "-U", "karon"]
interval: 2s
timeout: 2s
retries: 3
nyckeln:
image: ghcr.io/datasektionen/nyckeln-under-dorrmattan
configs:
- source: nyckeln.yaml
target: /config.yaml
ports:
- 7003:7003
- 7004:7004
voteit:
build:
dockerfile: Dockerfile.voteit
ports:
- 5000:5000
configs:
nginx.conf:
content: |
events {}
http {
server {
listen 7003;
location / {
proxy_pass http://nyckeln:7003;
}
}
}
nyckeln.yaml:
content: |
clients:
- id: "client-id"
secret: "client-secret"
redirect_uris:
- http://localhost:8080/auth/callback
users:
- ug_kth_id: some-id
kth_id: turetek
email: turetek@kth.se
first_name: Ture
family_name: Teknolog
membership: ordinary
nfc_id: 0
picture: https://thskth.se/wp-content/uploads/2023/06/ths-logo-bla-01-300x294-1.png
- ug_kth_id: some-id
kth_id: karklu
email: karklu@kth.se
first_name: Karin
family_name: Klubbare
membership: alumni
nfc_id: 0
picture: https://thskth.se/wp-content/uploads/2023/06/ths-logo-bla-01-300x294-1.png
- ug_kth_id: some-id
kth_id: diadat
email: diadat@kth.se
first_name: Diana
family_name: Datalog
membership: ordinary
nfc_id: 0
picture: https://thskth.se/wp-content/uploads/2023/06/ths-logo-bla-01-300x294-1.png
- ug_kth_id: some-id
kth_id: marmed
first_name: Martin
family_name: Median
membership: none
nfc_id: 0
picture: https://thskth.se/wp-content/uploads/2023/06/ths-logo-bla-01-300x294-1.png
hive:
tokens:
groups:
- name: Talman
id: talman
domain: example.com
members:
- turetek
- viktoe
permissions:
- id: moderator
- id: karon-admin
- name: Drektoratet
id: drektoratet
permissions:
- id: karon-admin
members:
- karklu
volumes:
karon-db-data: