-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/662 cleanup docker setup (#690)
* remove ember from docker * remove old docker setup and start configure keycloak * connect rails with local keycloak * create new keycloak export * clean up * setup keycloak properly * clean up keycloak login * delete uselss files * clean up application.html.haml * improve config * clean up docker compose file * add container to compile assets on runtime * display auth strategy in devmode * update env variables * update env fetch logic * split docker compose file for usecases with and without keycloak * add keycloak dockerfile * add proper docker-compose files * change name of db * update env vars * fix yarn script and env settings * Use proper strategy to check authentication method * update readme * Update dockerfile and add warning for non seeded db * rollback rails-entrypoint * use default Rails.env.development? * unify all param methods * User param converter --------- Co-authored-by: Yanick Minder <minder@puzzle.ch>
- Loading branch information
1 parent
4d4b3e9
commit b35582a
Showing
31 changed files
with
2,052 additions
and
2,153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,13 @@ | ||
LOCAL=true | ||
DEVELOPMENT=true | ||
KEYCLOAK=false | ||
|
||
DISPLAY= ${DISPLAY} | ||
RAILS_DB_NAME=skills_development | ||
RAILS_DB_USERNAME=skills | ||
RAILS_DB_PASSWORD=skills | ||
|
||
# Postgres | ||
POSTGRES_DB=skills_development | ||
POSTGRES_USER=skills | ||
POSTGRES_PASSWORD=skills |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
js: yarn build --watch | ||
js: yarn build --watch=forever | ||
css: yarn watch:css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
client_id: pitc_skills_rails_backend | ||
admin_role: ADMIN | ||
host_url: | ||
realm: | ||
client_id: | ||
secret: | ||
host_url: https://sso-test.puzzle.ch | ||
realm: pitc | ||
admin_role: ADMIN |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
services: | ||
rails: | ||
env_file: rails.env |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,16 @@ | ||
version: '3' | ||
include: | ||
- ../../../docker-compose.yml | ||
|
||
services: | ||
keycloak: | ||
container_name: keycloak | ||
image: quay.io/keycloak/keycloak:8.0.1 | ||
image: quay.io/keycloak/keycloak:23.0.7 | ||
env_file: keycloak.env | ||
command: "-Djboss.socket.binding.port-offset=100 -Dkeycloak.import=/realm-export.json -Dkeycloak.migration.strategy=IGNORE_EXISTING" | ||
ports: | ||
- 8180:8180 | ||
- 8080:8080 | ||
command: | ||
- start-dev | ||
- --import-realm | ||
- --http-relative-path=/auth | ||
volumes: | ||
- ${PWD}/realm-export.json:/realm-export.json | ||
depends_on: | ||
- postgres | ||
postgres: | ||
image: postgres | ||
volumes: | ||
- postgres_data:/var/lib/postgresql/data | ||
env_file: keycloak.env | ||
web: | ||
image: puzzle/skills:latest | ||
container_name: skills_web | ||
ports: | ||
- '8080:3000' | ||
depends_on: | ||
- db | ||
env_file: | ||
- skills.env | ||
volumes: | ||
- skills-store:/opt/app-root/src/uploads/ | ||
db: | ||
image: postgres:9.5.7 | ||
container_name: skills_db | ||
ports: | ||
- '5432:5432' | ||
restart: always | ||
env_file: | ||
- skills.env | ||
volumes: | ||
- skills-postgresql:/var/lib/postgresql/data | ||
|
||
volumes: | ||
postgres_data: | ||
skills-postgresql: | ||
skills-store: | ||
- ${PWD}/pitc-with-users.json:/opt/keycloak/data/import/realm.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,7 @@ | ||
#Keycloak container | ||
DB_VENDOR=POSTGRES | ||
DB_ADDR=postgres | ||
DB_DATABASE=keycloak | ||
DB_USER=keycloak | ||
DB_SCHEMA=public | ||
DB_PASSWORD=password | ||
KEYCLOAK_USER=admin | ||
KEYCLOAK_USER=user | ||
KEYCLOAK_PASSWORD=password | ||
KEYCLOAK_LOGLEVEL=INFO | ||
|
||
#Postgres container keyclaok | ||
POSTGRES_DB=keycloak | ||
POSTGRES_USER=keycloak | ||
POSTGRES_PASSWORD=password | ||
KEYCLOAK_ADMIN=admin | ||
KEYCLOAK_ADMIN_PASSWORD=password | ||
|
||
KEYCLOAK_LOGLEVEL=INFO |
Oops, something went wrong.