Skip to content

Commit

Permalink
compose:feat - Adding compose of the keycloak file (#556)
Browse files Browse the repository at this point in the history
Signed-off-by: Wilian Gabriel <wilian.silva@zup.com.br>
  • Loading branch information
wiliansilvazup authored Feb 16, 2022
1 parent 46dc2dc commit 6083df3
Show file tree
Hide file tree
Showing 3 changed files with 5,588 additions and 0 deletions.
254 changes: 254 additions & 0 deletions deployments/compose/keycloak/compose-dev.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,254 @@
# Copyright 2022 ZUP IT SERVICOS EM TECNOLOGIA E INOVACAO SA
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: '3'
services:
postgresql_keycloak:
container_name: postgresql_keycloak
network_mode: "host"
image: postgres:14
expose:
- "5433"
command: -p 5433
environment:
POSTGRES_PASSWORD: root
POSTGRES_USER: root
volumes:
- ./database:/docker-entrypoint-initdb.d
keycloak:
depends_on:
- "postgresql_keycloak"
container_name: keycloak
network_mode: "host"
image: jboss/keycloak:15.1.1
expose:
- "8080"
environment:
DB_VENDOR: "postgres"
DB_ADDR: "127.0.0.1"
DB_PORT: "5433"
DB_USER: "root" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
DB_PASSWORD: "root" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
KEYCLOAK_USER: "root" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
KEYCLOAK_PASSWORD: "root" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
rabbit:
container_name: rabbit
image: rabbitmq:3-management
ports:
- "5672:5672"
- "15672:15672"
horusec_postgresql:
container_name: horusec_postgresql
network_mode: "host"
image: postgres:12
environment:
POSTGRES_PASSWORD: root # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
POSTGRES_USER: root # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
POSTGRES_DB: horusec_db
volumes:
- /var/lib/postgres/db/data:/var/lib/postgresql/data
tty: true
logging:
driver: json-file
options:
max-size: 10m
horusec-messages:
build:
context: ../../messages
dockerfile: ./deployments/dockerfiles/Dockerfile.dev
depends_on:
- "rabbit"
restart: always
container_name: horusec-messages
network_mode: "host"
environment:
HORUSEC_PORT: "8002"
HORUSEC_BROKER_HOST: "127.0.0.1"
HORUSEC_BROKER_PORT: "5672"
HORUSEC_BROKER_USERNAME: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_BROKER_PASSWORD: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_SMTP_ADDRESS: "smtp.mailtrap.io"
HORUSEC_SMTP_USERNAME: ${HORUSEC_SMTP_USERNAME} # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_SMTP_PASSWORD: ${HORUSEC_SMTP_PASSWORD} # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_SMTP_HOST: "smtp.mailtrap.io"
HORUSEC_SMTP_PORT: "2525"
HORUSEC_EMAIL_FROM: "horusec@zup.com.br"
horusec-auth:
build:
context: ../../auth
dockerfile: ./deployments/dockerfiles/Dockerfile.dev
depends_on:
- "rabbit"
- "horusec_postgresql"
restart: always
container_name: horusec-auth
network_mode: "host"
environment:
HORUSEC_PORT: "8006"
HORUSEC_GRPC_PORT: "8007"
HORUSEC_DATABASE_SQL_URI: "postgresql://root:root@127.0.0.1:5432/horusec_db?sslmode=disable" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DATABASE_SQL_LOG_MODE: "false"
HORUSEC_JWT_SECRET_KEY: "horusec-secret" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_KEYCLOAK_BASE_PATH: "http://127.0.0.1:8080"
HORUSEC_KEYCLOAK_CLIENT_ID: "horusec-private" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_KEYCLOAK_CLIENT_SECRET: "f00907ba-87b7-441b-aae7-bd4c74de1938" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_KEYCLOAK_REALM: "master" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_LDAP_BASE: "dc=wimpi,dc=net"
HORUSEC_LDAP_HOST: "ldap-service"
HORUSEC_LDAP_PORT: "10389"
HORUSEC_LDAP_USESSL: "false"
HORUSEC_LDAP_SKIP_TLS: "true"
HORUSEC_LDAP_INSECURE_SKIP_VERIFY: "true"
HORUSEC_LDAP_BINDDN: "uid=admin,ou=system"
HORUSEC_LDAP_BINDPASSWORD: "secret" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_LDAP_USERFILTER: "(sAMAccountName=%s)"
HORUSEC_LDAP_ADMIN_GROUP: "admin" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_ENABLE_APPLICATION_ADMIN: "false"
HORUSEC_APPLICATION_ADMIN_DATA: "{\"username\": \"horusec-admin\", \"email\":\"horusec-admin@example.com\", \"password\":\"Devpass0*\"}" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_ENABLE_DEFAULT_USER: "true"
HORUSEC_DEFAULT_USER_DATA: "{\"username\": \"dev\", \"email\":\"dev@example.com\", \"password\":\"Devpass0*\"}" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_AUTH_TYPE: "keycloak"
HORUSEC_BROKER_HOST: "127.0.0.1"
HORUSEC_BROKER_PORT: "5672"
HORUSEC_BROKER_USERNAME: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_BROKER_PASSWORD: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DISABLE_EMAILS: "true"
HORUSEC_AUTH_URL: "127.0.0.1:8006"
HORUSEC_MANAGER_URL: "127.0.0.1:8043"
horusec-core:
build:
context: ../../core
dockerfile: ./deployments/dockerfiles/Dockerfile.dev
depends_on:
- "rabbit"
- "horusec_postgresql"
- "horusec-auth"
restart: always
container_name: horusec-core
network_mode: "host"
environment:
HORUSEC_PORT: "8003"
HORUSEC_DISABLED_BROKER: "true"
HORUSEC_BROKER_HOST: "127.0.0.1"
HORUSEC_BROKER_PORT: "5672"
HORUSEC_BROKER_USERNAME: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_BROKER_PASSWORD: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DATABASE_SQL_URI: "postgresql://root:root@127.0.0.1:5432/horusec_db?sslmode=disable" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DATABASE_SQL_LOG_MODE: "false"
HORUSEC_GRPC_AUTH_URL: "127.0.0.1:8007"
HORUSEC_MANAGER_URL: "127.0.0.1:8043"
horusec-analytic:
build:
context: ../../analytic
dockerfile: ./deployments/dockerfiles/Dockerfile.dev
depends_on:
- "rabbit"
- "horusec_postgresql"
- "horusec-auth"
restart: always
container_name: horusec-analytic
network_mode: "host"
environment:
HORUSEC_PORT: "8005"
HORUSEC_DATABASE_SQL_URI: "postgresql://root:root@127.0.0.1:5432/horusec_analytic_db?sslmode=disable" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DATABASE_SQL_LOG_MODE: "false"
HORUSEC_GRPC_AUTH_URL: "127.0.0.1:8007"
HORUSEC_BROKER_HOST: "127.0.0.1"
HORUSEC_BROKER_PORT: "5672"
HORUSEC_BROKER_USERNAME: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_BROKER_PASSWORD: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
horusec-api:
build:
context: ../../api
dockerfile: ./deployments/dockerfiles/Dockerfile.dev
depends_on:
- "rabbit"
- "horusec_postgresql"
- "horusec-auth"
restart: always
container_name: horusec-api
network_mode: "host"
environment:
HORUSEC_PORT: "8000"
HORUSEC_DATABASE_SQL_URI: "postgresql://root:root@127.0.0.1:5432/horusec_db?sslmode=disable" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DATABASE_SQL_LOG_MODE: "false"
HORUSEC_GRPC_AUTH_URL: "127.0.0.1:8007"
HORUSEC_BROKER_HOST: "127.0.0.1"
HORUSEC_BROKER_PORT: "5672"
HORUSEC_BROKER_USERNAME: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_BROKER_PASSWORD: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
horusec-vulnerability:
build:
context: ../../vulnerability
dockerfile: ./deployments/dockerfiles/Dockerfile.dev
depends_on:
- "rabbit"
- "horusec_postgresql"
restart: always
container_name: horusec-vulnerability
network_mode: "host"
environment:
HORUSEC_PORT: "8001"
HORUSEC_DATABASE_SQL_URI: "postgresql://root:root@127.0.0.1:5432/horusec_db?sslmode=disable" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DATABASE_SQL_LOG_MODE: "false"
HORUSEC_GRPC_AUTH_URL: "127.0.0.1:8007"
HORUSEC_BROKER_HOST: "127.0.0.1"
HORUSEC_BROKER_PORT: "5672"
HORUSEC_BROKER_USERNAME: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_BROKER_PASSWORD: "guest" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
horusec-webhook:
build:
context: ../../webhook
dockerfile: ./deployments/dockerfiles/Dockerfile.dev
depends_on:
- "rabbit"
- "horusec_postgresql"
restart: always
container_name: horusec-webhook
network_mode: "host"
environment:
HORUSEC_PORT: "8004"
HORUSEC_DATABASE_SQL_URI: "postgresql://root:root@127.0.0.1:5432/horusec_db?sslmode=disable" # Sensitive information we not recommended usage in production environment, change for usage strong data for connection with this service
HORUSEC_DATABASE_SQL_LOG_MODE: "false"
HORUSEC_GRPC_AUTH_URL: "127.0.0.1:8007"
HORUSEC_BROKER_HOST: "127.0.0.1"
HORUSEC_BROKER_PORT: "5672"
HORUSEC_BROKER_USERNAME: "guest"
HORUSEC_BROKER_PASSWORD: "guest"
horusec-manager:
build:
context: ../../manager
dockerfile: ./deployments/dockerfiles/Dockerfile
ports:
- "8043:8080"
restart: always
container_name: horusec-manager
environment:
HORUSEC_ENDPOINT_API: ${HORUSEC_ENDPOINT_API}
HORUSEC_ENDPOINT_ANALYTIC: ${HORUSEC_ENDPOINT_ANALYTIC}
HORUSEC_ENDPOINT_CORE: ${HORUSEC_ENDPOINT_CORE}
HORUSEC_ENDPOINT_WEBHOOK: ${HORUSEC_ENDPOINT_WEBHOOK}
HORUSEC_ENDPOINT_AUTH: ${HORUSEC_ENDPOINT_AUTH}
HORUSEC_ENDPOINT_VULNERABILITY: ${HORUSEC_ENDPOINT_VULNERABILITY}
REACT_APP_HORUSEC_ENDPOINT_API: ${REACT_APP_HORUSEC_ENDPOINT_API}
REACT_APP_HORUSEC_ENDPOINT_ANALYTIC: ${REACT_APP_HORUSEC_ENDPOINT_ANALYTIC}
REACT_APP_HORUSEC_ENDPOINT_CORE: ${REACT_APP_HORUSEC_ENDPOINT_CORE}
REACT_APP_HORUSEC_ENDPOINT_WEBHOOK: ${REACT_APP_HORUSEC_ENDPOINT_WEBHOOK}
REACT_APP_HORUSEC_ENDPOINT_AUTH: ${REACT_APP_HORUSEC_ENDPOINT_AUTH}
REACT_APP_HORUSEC_ENDPOINT_VULNERABILITY: ${REACT_APP_HORUSEC_ENDPOINT_VULNERABILITY}
REACT_APP_MICROFRONTEND_PUBLIC_PATH: ${REACT_APP_MICROFRONTEND_PUBLIC_PATH}
REACT_APP_HORUSEC_MANAGER_THEME: ${REACT_APP_HORUSEC_MANAGER_THEME}
REACT_APP_KEYCLOAK_BASE_PATH: "http:\\/\\/127.0.0.1:8080\\/auth"
REACT_APP_KEYCLOAK_CLIENT_ID: "horusec-public"
REACT_APP_KEYCLOAK_REALM: "master"
Loading

0 comments on commit 6083df3

Please sign in to comment.