Skip to content

Commit

Permalink
Update keycloak
Browse files Browse the repository at this point in the history
  • Loading branch information
websoft9 committed Jan 10, 2025
1 parent 2bf0193 commit 762e9ba
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 212 deletions.
50 changes: 11 additions & 39 deletions apps/keycloak/.env
Original file line number Diff line number Diff line change
@@ -1,47 +1,19 @@
W9_REPO=wordpress
W9_DIST=community
W9_VERSION=latest

W9_POWER_PASSWORD=1PrMxExC45LsCT

# Environments which for user settings when create application
# Named expression: W9_xxx_xxx_SET, xxx refer to file fields
W9_HTTP_PORT_SET=9001
# W9_HTTPS_PORT_SET=9002
# W9_DB_PORT_SET=3306
# W9_SSH_PORT_SET=23
W9_KEY_SET="dfsjdkjf77xjxcjcj"
W9_REPO=keycloak/keycloak
W9_DIST='community'
W9_VERSION='latest'
W9_HTTP_PORT_SET='9001'
W9_POWER_PASSWORD='t4cd0S#PGKN5ivQ2'

#### -- Not allowed to edit below environments when recreate app based on existing data -- ####

W9_ID=keycloak

# W9_HTTP_PORT or W9_HTTPS_PORT is need at leaset and used for proxy for web application
# Some container (e.g teleport) need HTTPS access, then need to set this pra
W9_HTTP_PORT=80
W9_HTTPS_PORT=81

W9_ID='keycloak'
W9_HTTP_PORT=8080
W9_LOGIN_USER=admin
# use https://1password.com/zh-cn/password-generator/ to genarate 14 bit password
# this password can also use password file
W9_LOGIN_PASSWORD=$W9_POWER_PASSWORD
W9_ADMIN_PATH="/wp-login"

# Container name's suffix must use one of the value
W9_DB_EXPOSE="mysql,postgresql,mariadb,mongodb,redis"

# It is used when the application APP needs to set an external URL, which can be IP(or domain), IP:PORT
# If have protocols, should be set it in the APP's ENV
W9_URL=internet_ip:$W9_HTTP_PORT_SET
# modifies W9_URL on init when it is true
W9_URL_REPLACE=true

W9_URL='internet_ip:$W9_HTTP_PORT_SET'
W9_NETWORK=websoft9

#### ----------------------------------------------------------------------------------------- ####

####Below environment is created by : https://www.keycloak.org/getting-started/getting-started-docker ####
KC_BOOTSTRAP_ADMIN_USERNAME=$W9_LOGIN_USER
KC_BOOTSTRAP_ADMIN_PASSWORD=$W9_LOGIN_PASSWORD

# Below environment is created by apphub

#W9_NAME=""
#W9_RCODE=""
5 changes: 0 additions & 5 deletions apps/keycloak/CHANGELOG.md

This file was deleted.

21 changes: 0 additions & 21 deletions apps/keycloak/Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions apps/keycloak/Notes.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# Appname
## FAQ
# Keycloak
## Support multiple languages
26 changes: 0 additions & 26 deletions apps/keycloak/README.jinja2

This file was deleted.

44 changes: 8 additions & 36 deletions apps/keycloak/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,49 +1,21 @@
# image,docs: https://hub.docker.com/_/wordpress/
# image: https://hub.docker.com/r/keycloak/keycloak
# docs: https://www.keycloak.org/getting-started/getting-started-docker

services:

wordpress:
keycloak:
image: $W9_REPO:$W9_VERSION
container_name: $W9_ID
restart: unless-stopped
#This is for access host from container
# extra_hosts: ["host.docker.internal:host-gateway"]
# command: |
# /bin/bash -c "ping -c 3 host.docker.internal"
logging:
driver: "json-file"
options:
max-file: "5"
max-size: 10m
deploy:
resources:
limits:
memory: 5g
cpus: '0.7'
ports:
- $W9_HTTP_PORT_SET:80
- $W9_HTTP_PORT_SET:8080
env_file: .env
command: start-dev
volumes:
- wordpress:/var/www/html
- ./src/php_exra.ini:/usr/local/etc/php/conf.d/php_exra.ini

mariadb:
image: mariadb:10.4
container_name: $W9_ID-mariadb
restart: unless-stopped
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --innodb_log_buffer_size=30M
volumes:
- mysql_data:/var/lib/mysql
environment:
MYSQL_DATABASE: $W9_ID
MYSQL_USER: $W9_ID
MYSQL_PASSWORD: $W9_POWER_PASSWORD
MYSQL_ROOT_PASSWORD: $W9_POWER_PASSWORD
- keycloak_data:/opt/keycloak/data

volumes:
wordpress:
mysql_data:

keycloak_data:

networks:
default:
name: $W9_NETWORK
Expand Down
1 change: 0 additions & 1 deletion apps/keycloak/src/after_up.sh

This file was deleted.

12 changes: 0 additions & 12 deletions apps/keycloak/src/encrypt.sh

This file was deleted.

3 changes: 0 additions & 3 deletions apps/keycloak/src/filelist

This file was deleted.

1 change: 0 additions & 1 deletion apps/keycloak/src/get_version.sh

This file was deleted.

57 changes: 0 additions & 57 deletions apps/keycloak/src/nginx-proxy.conf.template

This file was deleted.

8 changes: 0 additions & 8 deletions apps/keycloak/src/php_exra.ini

This file was deleted.

1 change: 0 additions & 1 deletion apps/keycloak/src/replace_url.sh

This file was deleted.

0 comments on commit 762e9ba

Please sign in to comment.