Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

keycloak docker hub

version: "3"
services:
  #=================================
  # AUTH SERVICES ENVIRONMENT
  #=================================
  auth:
    image: jboss/keycloak:latest
    environment:
      - KEYCLOAK_USER='admin'
      - KEYCLOAK_PASSWORD='admin'
      - KC_DB='postgres'
      - KC_DB_URL='jdbc:postgresql://localhost/postgres'
      - KC_DB_USERNAME='admin123'
      - KC_DB_PASSWORD='admin123'
    ports:
      - 8080:8080
    depends_on:
      - database
    networks:
      - go_networks
  #=================================
  # DATABASE SERVICES ENVIRONMENT
  #=================================
  database:
    image: postgres:14-alpine
    environment:
      - POSTGRES_DB='postgres'
      - POSTGRES_USER='admin123'
      - POSTGRES_PASSWORD='admin123'
    ports:
      - 5432:5432
    volumes:
      - database:/var/lib/postgres/data
    networks:
      - go_networks
  #=================================
  # VOLUME PERSISTENT DATA
  #=================================
volumes:
  database:
  #=================================
  # NETWORK SHARING GROUP
  #=================================
networks:
  go_networks:
Source by refactorfirst.com #
 
PREVIOUS NEXT
Tagged: #keycloak #docker #hub
ADD COMMENT
Topic
Name
2+3 =