Starting keycloak with a docker-compose-swwarm

78 views
Skip to first unread message

Killan Moal

unread,
May 9, 2022, 8:45:01 AM5/9/22
to Keycloak User
Hello,

I'm trying to start a keycloak server on a microservices application with docker.
I'm trying to start the server on the port 111111 with the docker-compose-swarm.yml but nothing happen.

There is the code of the file:
version: "3.9"

volumes:
  postgres_data:
    driver: local

services:
... Other services
postgres:
    image: postgres
    volumes:
      - postgres_data:/var/lib/postgresql/data
    environment:
      POSTGRES_DB: keycloak
      POSTGRES_USER: keycloak
      POSTGRES_PASSWORD: password
     
  keycloak:
    build: .
    image: keycloak
    command: ["-Djboss.http.port=11111"]
    environment:
      DB_VENDOR: POSTGRES
      DB_ADDR: postgres
      DB_DATABASE: keycloak
      DB_USER: keycloak
      DB_SCHEMA: public
      DB_PASSWORD: password
      KEYCLOAK_USER: admin
      KEYCLOAK_PASSWORD: admin
      # 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:
      - 11111:11111
    depends_on:
      - postgres

networks:
  taliesin:
    driver: overlay

I use the docker images from jBoss.

Thanks in advance for the answers
Reply all
Reply to author
Forward
0 new messages