Skip to content

Instantly share code, notes, and snippets.

@ram0973
Last active January 9, 2024 13:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ram0973/d3ba8711f9d9e72e3ca8647796aa1cb9 to your computer and use it in GitHub Desktop.
Save ram0973/d3ba8711f9d9e72e3ca8647796aa1cb9 to your computer and use it in GitHub Desktop.
Keycloak in Docker with https port 8443
---
# Use with docker-compose up
version: "3.9"
services:
keycloak-service:
image: quay.io/keycloak/keycloak:23.0.4
restart: always
network_mode: host
ports:
- "80:8180"
- "443:8443"
environment:
#DB_VENDOR: POSTGRES
#DB_ADDR: postgres
#DB_DATABASE: keycloak
#DB_USER: postgres
#DB_PASSWORD: postgres
#DB_SCHEMA: public
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: admin
command:
- start-dev
#- --import-realm
- --http-port=8180
- --https-port=8443
- --https-certificate-file=/etc/x509/https/tls.crt
- --https-certificate-key-file=/etc/x509/https/tls.key
volumes:
- ./docker/certs/localhost.cer:/etc/x509/https/tls.crt
- ./docker/certs/localhost.pkcs8:/etc/x509/https/tls.key
#volumes:
# - /home/keycloak/realm.json:/opt/keycloak/data/import/realm.json
#depends_on:
# - postgres-service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment