Skip to content

Commit 23ce04a

Browse files
author
Rens van Moorsel
committed
feat: add local keycloak to devcontainer
1 parent c837f89 commit 23ce04a

23 files changed

Lines changed: 3055 additions & 8 deletions

File tree

.devcontainer/compose.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ services:
77
volumes:
88
- ..:/workspaces:cached
99
command: sleep infinity
10-
environment:
11-
- PostgresqlConnectionString=Host=db;Port=5432;Database=postgres;Username=postgres;Password=postgres
1210
env_file:
1311
- ../.env
12+
- ./devcontainer.env
1413
networks:
1514
- tavern-net
1615
depends_on:
1716
- db
1817
- localstack
18+
- keycloak
1919

2020
db:
2121
image: postgres:17
@@ -58,6 +58,22 @@ services:
5858
depends_on:
5959
- devcontainer
6060

61+
keycloak:
62+
image: quay.io/keycloak/keycloak:26.1
63+
container_name: tavern-keycloak
64+
command: start-dev --import-realm
65+
environment:
66+
KC_BOOTSTRAP_ADMIN_USERNAME: admin
67+
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
68+
KC_IMPORT_OVERWRITE: "true"
69+
volumes:
70+
- ./keycloak-setup:/opt/keycloak/data/import
71+
- ./keycloak-themes:/opt/keycloak/themes
72+
ports:
73+
- "8082:8080"
74+
networks:
75+
- tavern-net
76+
6177
volumes:
6278
postgres-data:
6379

.devcontainer/devcontainer.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
PostgresqlConnectionString=Host=db;Port=5432;Database=postgres;Username=postgres;Password=postgres
2+
KeycloakUrl=http://keycloak:8080
3+
VITE_KeycloakUrl=http://localhost:8082
4+
AUTH_SYSTEM=KEYCLOAK
5+
KeycloakBackendClientId=backend-tavern
6+
KeycloakClientSecret=Z535wp6jV2wg65QnAr4LLPcKghRmSNJa

.devcontainer/devcontainer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@
3333
3000,
3434
8080,
3535
8081,
36-
5432,
3736
5173,
3837
4040
3938
],

0 commit comments

Comments
 (0)