Skip to content

Commit

Permalink
Merge pull request #9 from Cecropia/TG-11-SingleDockerCompose
Browse files Browse the repository at this point in the history
Tg 11 single docker compose
  • Loading branch information
cvillarongace authored Oct 29, 2024
2 parents b4c0d73 + a39cee3 commit 2bdc34a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
18 changes: 12 additions & 6 deletions KeyCloak/DockerFile → Docker/Compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ services:
networks:
- keycloak_net
environment:
KEYCLOAK_ADMIN: ${KEYCLOAK_USER}
KEYCLOAK_ADMIN: ${KEYCLOAK_USER}
KEYCLOAK_ADMIN_PASSWORD: ${KEYCLOAK_PASSWORD}
command:
- start-dev
command:
- start-dev
- --import-realm
volumes:
- ./Multiplied.json:/opt/keycloak/data/import/realm.json
app:
container_name: keycloak_net
ports:
- "8081:8080"
networks:
- keycloak_net
build: ../KeycloakIntegration/
networks:
keycloak_net:
name: keycloak_net
external: true
keycloak_net:
name: keycloak_net
File renamed without changes.
2 changes: 1 addition & 1 deletion KeyCloak/env → Docker/env
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
COMPOSE_FILE_SEPARATOR=;
COMPOSE_FILE=DockerFile
COMPOSE_FILE=Compose.yml

KEYCLOAK_VERSION=26.0.0
KEYCLOAK_USER=admin
Expand Down
11 changes: 3 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,13 @@ For full development capabilities, it is recommended to use Visual Studio on Win

---

# KeyCloak Setup
# Environment Setup
1. Install [Docker](https://www.docker.com/products/docker-desktop/)
1. Create the operational network with the following command `docker network create keycloak_net`
1. From [Keycloak DockerFile directory](/KeyCloak/) run : `docker-compose --env-file env up --build -d`
1. user name and password can be edited form the [env file](/KeyCloak/env)
1. From [Docker compose folder](/Docker/) run : `docker-compose --env-file env up --build -d`
1. user name and password for Keycloak can be edited form the [env file](/KeyCloak/env)
1. Keycloak version can be updated from the [env file](/KeyCloak/env)
1. Seed Realm, Clients and Users can be edited from the [realm json file](/KeyCloak/Multiplied.json) or a different json file can be reference from the [env file](/KeyCloak/env)
1. Log in into [Keycloak](http://localhost:8080/admin)

# DotNet Setup
1. From [.NET DockerFile directory](/KeyCloakIntegration/) run: `docker build -t dotnet_keycloak-image -f DockerFile .`
1. Start app with the following command `docker run --net keycloak_net --name dotnet_app -d -p 8081:8080 dotnet_keycloak-image`
1. Navigate to [app](http://localhost:8081/)

# GitHub Actions
Expand Down

0 comments on commit 2bdc34a

Please sign in to comment.