Skip to content

Commit

Permalink
chore: production keycloak dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaspalma committed Dec 22, 2024
1 parent 30037a6 commit 0f08ea2
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 14 deletions.
7 changes: 7 additions & 0 deletions deploy/Dockerfile.keycloak
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM quay.io/keycloak/keycloak:26.0.0

COPY sso/certs /etc/x509/https

RUN /opt/keycloak/bin/kc.sh build

ENTRYPOINT ["/opt/keycloak/bin/kc.sh", "start"]
13 changes: 13 additions & 0 deletions docker-compose.dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
keycloak:
image: quay.io/keycloak/keycloak:26.0.0
command: ["start-dev"]
container_name: keycloak
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_IMPORT: /tmp/realm-export.json
ports:
- 8080:8080
18 changes: 17 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,20 @@ services:
context: .
dockerfile: deploy/Dockerfile.nginx
ports:
- "80:80"
- "80:80"

keycloak:
build:
context: .
dockerfile: deploy/Dockerfile.keycloak
container_name: keycloak
# read from .env file
env_file: "sso/.env"
environment:
KC_BOOTSTRAP_ADMIN_USERNAME: admin
KC_BOOTSTRAP_ADMIN_PASSWORD: admin
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: admin
KEYCLOAK_IMPORT: /tmp/realm-export.json
ports:
- 8080:8080
9 changes: 9 additions & 0 deletions sso/.env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
KEYCLOAK_ADMIN=
KEYCLOAK_ADMIN_PASSWORD=
KC_HOSTNAME=
KC_DB_URL=
KC_DB=
KC_DB_USERNAME=
KC_DB_PASSWORD=
KC_HTTPS_CERTIFICATE_FILE=
KC_HTTPS_CERTIFICATE_KEY_FILE=
13 changes: 0 additions & 13 deletions sso/compose.yml

This file was deleted.

0 comments on commit 0f08ea2

Please sign in to comment.