Skip to content

Instantly share code, notes, and snippets.

@sairamkrish
Created November 8, 2019 13:25
Show Gist options
  • Save sairamkrish/2431d02efc5d1ae05354acf01fd1a1c3 to your computer and use it in GitHub Desktop.
Save sairamkrish/2431d02efc5d1ae05354acf01fd1a1c3 to your computer and use it in GitHub Desktop.
Docker compose with keycloak and nginx
version: "3.7"
networks:
mynetwork:
name: mynetwork
attachable: true
services:
postgres:
image: postgres:12.0-alpine
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
ports:
- 5432:5432
networks:
- mynetwork
keycloak:
image: jboss/keycloak:7.0.1
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: password
# 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:
- 3333:8080
depends_on:
- postgres
networks:
- mynetwork
nginx:
image: fresh-nginx
ports:
- 80:80
networks:
- mynetwork
volumes:
- ./nginx-default.conf:/etc/nginx/conf.d/default.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment