Home > Mobile >  Keycloak Postgres docker connection failure
Keycloak Postgres docker connection failure

Time:11-01

I am trying to get up the keycloak instance via using keycloak, and the compose file I used is below which I get it from

enter image description here

enter image description here

CodePudding user response:

You can try this if you want, Application named test,

Database login are, keycloak:password

keycloak admin login is : root:root

this will be accessible with a web browser at localhost:8080

version: "3.8"
name: test
services:
    keycloak:
        image: jboss/keycloak:15.0.2
        environment:
            DB_VENDOR: POSTGRES
            DB_ADDR: postgres
            DB_DATABASE: keycloak
            DB_USER: keycloak
            DB_SCHEMA: public
            DB_PASSWORD: password
            KEYCLOAK_USER: root
            KEYCLOAK_PASSWORD: root
            KEYCLOAK_HOSTNAME: keycloak
            # Uncomment the line below if you want to specify JDBC parameters. The parameter below is just an example, and it shouldn't be used in production without knowledge. It is highly recommended that you read the PostgreSQL JDBC driver documentation in order to use it.
            #JDBC_PARAMS: "ssl=true"
        ports:
            - 8080:8080
        depends_on:
            - postgres   
        networks:
            - test
            
    postgres:
        image: postgres
        volumes:
            - postgres_data:/var/lib/postgresql/data
        environment:
            POSTGRES_DB: keycloak
            POSTGRES_USER: keycloak
            POSTGRES_PASSWORD: password
        networks:
            - test    
            
            
        
volumes:
  postgres_data:
      driver: local  
      

networks:
  test:
    driver: bridge
  • Related