-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathdocker-compose.oidc.yaml
211 lines (207 loc) · 5.82 KB
/
docker-compose.oidc.yaml
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
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
version: '3'
services:
api:
build:
context: .
dockerfile: Dockerfile
target: api-dev-env
ports:
- 80
restart: always
env_file:
- .env
environment:
- KEYCLOAK_ENABLED=false
- OIDC_ENABLED=true
- OIDC_URL=http://proxy:8080
- OIDC_CLIENT_ID=client-credentials-mock-client
- OIDC_CLIENT_SECRET=client-credentials-mock-client-secret
- OIDC_SECURE_COOKIES=false
- OIDC_AUDIENCE=some-app
- OIDC_SCOPES=openid,profile,email,some-app-scope-1
- LOG_LEVEL=${LOG_LEVEL:-debug}
- APP_URL=http://proxy:8080
- POSTGRES_HOST=postgres
- POSTGRES_DATABASE=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
- SERVER_URL=http://proxy:8080
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
- TOGETHER_API_KEY=${TOGETHER_API_KEY:-}
- FRONTEND_URL=http://frontend:8081
- ADMIN_USER_IDS=${ADMIN_USER_IDS-all}
- TEXT_EXTRACTION_URL=http://llamaindex:5000/api/v1/extract
- RAG_INDEX_URL=http://llamaindex:5000/api/v1/rag/chunk
- RAG_QUERY_URL=http://llamaindex:5000/api/v1/rag/query
- EVAL_USER_ID=${EVAL_USER_ID:-}
- FILESTORE_LOCALFS_PATH=/filestore
- TOOLS_ENABLED=true
- TOOLS_PROVIDER=${TOOLS_PROVIDER:-helix}
- TOOLS_MODEL=${TOOLS_MODEL:-llama3:instruct}
volumes:
- ./go.mod:/app/go.mod
- ./go.sum:/app/go.sum
- ./api:/app/api
- ${FILESTORE_DATA:-helix-filestore}:/filestore
depends_on:
- postgres
- oidc
extra_hosts:
- "host.docker.internal:host-gateway"
postgres:
image: postgres:12.13-alpine
restart: always
ports:
- 5432:5432
volumes:
- ${POSTGRES_DATA:-helix-postgres-db}:/var/lib/postgresql/data
- ./scripts/postgres:/docker-entrypoint-initdb.d
environment:
- POSTGRES_DB=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_ADMIN_PASSWORD-postgres}
- POSTGRES_DATABASES=keycloak
typesense:
build:
context: .
dockerfile: Dockerfile.typesense
command: ["--data-dir", "/data", "--api-key", "typesense"]
ports:
- 8108:8108
volumes:
- ${TYPESENSE_DATA:-helix-typesense-db}:/data
chrome:
image: ghcr.io/go-rod/rod:v0.115.0
restart: always
volumes:
- ./integration-test/data/smoke:/integration-test/data/smoke
ports:
- 7317:7317
frontend:
ports:
- 8081:${FRONTEND_INTERNAL_PORT:-8081}
build:
context: .
dockerfile: Dockerfile
target: ui-dev-env
restart: always
volumes:
- ./frontend/package.json:/app/package.json
- ./frontend/src:/app/src
- ./frontend/assets:/app/assets
- ./frontend/index.html:/app/index.html
- ./frontend/tsconfig.json:/app/tsconfig.json
- ./frontend/vite.config.ts:/app/vite.config.ts
oidc:
container_name: oidc-server-mock
image: ghcr.io/xdev-software/oidc-server-mock:latest # ARM fork
ports:
- 8080
environment:
ASPNETCORE_URLS: http://+:8080
ASPNETCORE_ENVIRONMENT: Development
AUTHENTICATION:ISSUER: http://proxy:8080
SERVER_OPTIONS_INLINE: |
{
"AccessTokenJwtType": "JWT",
"Discovery": {
"ShowKeySet": true
},
"Authentication": {
"CookieSameSiteMode": "Lax",
"CheckSessionCookieSameSiteMode": "Lax"
}
}
LOGIN_OPTIONS_INLINE: |
{
"AllowRememberLogin": false
}
LOGOUT_OPTIONS_INLINE: |
{
"AutomaticRedirectAfterSignOut": true
}
API_SCOPES_INLINE: |
- Name: some-app-scope-1
- Name: some-app-scope-2
API_RESOURCES_INLINE: |
- Name: some-app
Scopes:
- some-app-scope-1
- some-app-scope-2
CLIENTS_CONFIGURATION_INLINE: |
[
{
"ClientId": "client-credentials-mock-client",
"ClientSecrets": ["client-credentials-mock-client-secret"],
"Description": "Client for client credentials flow",
"AllowOfflineAccess": true,
"AllowedGrantTypes": ["authorization_code", "refresh_token"],
"RedirectUris": ["http://proxy:8080"],
"AllowedScopes": ["openid", "profile", "email", "some-app-scope-1"],
"AlwaysIncludeUserClaimsInIdToken": true,
"RequirePkce": false
}
]
USERS_CONFIGURATION_INLINE: |
[
{
"SubjectId": "1",
"Username": "test",
"Password": "test",
"Claims": [
{
"Type": "name",
"Value": "test name"
},
{
"Type": "email",
"Value": "[email protected]"
},
{
"Type": "preferred_username",
"Value": "test"
},
{
"Type": "family_name",
"Value": "Smith"
},
{
"Type": "given_name",
"Value": "John"
},
{
"Type": "nickname",
"Value": "test nickname"
}
]
}
]
ASPNET_SERVICES_OPTIONS_INLINE: |
{
"ForwardedHeadersOptions": {
"ForwardedHeaders" : "All"
}
}
# volumes:
# - ./scripts/oidc:/tmp/config:ro
proxy:
image: caddy:2
restart: unless-stopped
ports:
- "8080:8080"
volumes:
- ./scripts/Caddyfile.oidc:/etc/caddy/Caddyfile
environment:
- DOMAIN=proxy
depends_on:
- api
- oidc
volumes:
helix-keycloak-db:
helix-postgres-db:
helix-pgvector-db:
helix-filestore:
helix-typesense-db:
networks:
default:
name: helix_default