Initial version of sasiedzi generated by generator-jhipster@8.7.2

This commit is contained in:
2024-10-29 19:16:15 +01:00
commit adea956b48
271 changed files with 35183 additions and 0 deletions
+38
View File
@@ -0,0 +1,38 @@
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: sasiedzi
services:
app:
image: sasiedzi
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- SPRING_PROFILES_ACTIVE=prod,api-docs
- MANAGEMENT_PROMETHEUS_METRICS_EXPORT_ENABLED=true
- SPRING_DATASOURCE_URL=jdbc:postgresql://postgresql:5432/sasiedzi
- SPRING_LIQUIBASE_URL=jdbc:postgresql://postgresql:5432/sasiedzi
- SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/realms/jhipster
- SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=web_app
- SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=web_app
ports:
- 127.0.0.1:8080:8080
healthcheck:
test:
- CMD
- curl
- -f
- http://localhost:8080/management/health
interval: 5s
timeout: 5s
retries: 40
depends_on:
postgresql:
condition: service_healthy
keycloak:
condition: service_healthy
postgresql:
extends:
file: ./postgresql.yml
service: postgresql
keycloak:
extends:
file: ./keycloak.yml
service: keycloak
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,11 @@
apiVersion: 1
providers:
- name: 'Prometheus'
orgId: 1
folder: ''
type: file
disableDeletion: false
editable: true
options:
path: /etc/grafana/provisioning/dashboards
@@ -0,0 +1,50 @@
apiVersion: 1
# list of datasources that should be deleted from the database
deleteDatasources:
- name: Prometheus
orgId: 1
# list of datasources to insert/update depending
# whats available in the database
datasources:
# <string, required> name of the datasource. Required
- name: Prometheus
# <string, required> datasource type. Required
type: prometheus
# <string, required> access mode. direct or proxy. Required
access: proxy
# <int> org id. will default to orgId 1 if not specified
orgId: 1
# <string> url
# On MacOS, replace localhost by host.docker.internal
url: http://localhost:9090
# <string> database password, if used
password:
# <string> database user, if used
user:
# <string> database name, if used
database:
# <bool> enable/disable basic auth
basicAuth: false
# <string> basic auth username
basicAuthUser: admin
# <string> basic auth password
basicAuthPassword: admin
# <bool> enable/disable with credentials headers
withCredentials:
# <bool> mark as default datasource. Max one per org
isDefault: true
# <map> fields that will be converted to json and stored in json_data
jsonData:
graphiteVersion: '1.1'
tlsAuth: false
tlsAuthWithCACert: false
# <string> json object of data that will be encrypted.
secureJsonData:
tlsCACert: '...'
tlsClientCert: '...'
tlsClientKey: '...'
version: 1
# <bool> allow users to edit datasources from the UI.
editable: true
@@ -0,0 +1,52 @@
## How to use JHCC docker compose
# To allow JHCC to reach JHipster application from a docker container note that we set the host as host.docker.internal
# To reach the application from a browser, you need to add '127.0.0.1 host.docker.internal' to your hosts file.
### Discovery mode
# JHCC support 3 kinds of discovery mode: Consul, Eureka and static
# In order to use one, please set SPRING_PROFILES_ACTIVE to one (and only one) of this values: consul,eureka,static
### Discovery properties
# According to the discovery mode choose as Spring profile, you have to set the right properties
# please note that current properties are set to run JHCC with default values, personalize them if needed
# and remove those from other modes. You can only have one mode active.
#### Eureka
# - EUREKA_CLIENT_SERVICE_URL_DEFAULTZONE=http://admin:admin@host.docker.internal:8761/eureka/
#### Consul
# - SPRING_CLOUD_CONSUL_HOST=host.docker.internal
# - SPRING_CLOUD_CONSUL_PORT=8500
#### Static
# Add instances to "MyApp"
# - SPRING_CLOUD_DISCOVERY_CLIENT_SIMPLE_INSTANCES_MYAPP_0_URI=http://host.docker.internal:8081
# - SPRING_CLOUD_DISCOVERY_CLIENT_SIMPLE_INSTANCES_MYAPP_1_URI=http://host.docker.internal:8082
# Or add a new application named MyNewApp
# - SPRING_CLOUD_DISCOVERY_CLIENT_SIMPLE_INSTANCES_MYNEWAPP_0_URI=http://host.docker.internal:8080
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
#### IMPORTANT
# If you choose Consul or Eureka mode:
# Do not forget to remove the prefix "127.0.0.1" in front of their port in order to expose them.
# This is required because JHCC need to communicate with Consul or Eureka.
# - In Consul mode, the ports are in the consul.yml file.
# - In Eureka mode, the ports are in the jhipster-registry.yml file.
name: sasiedzi
services:
jhipster-control-center:
image: 'jhipster/jhipster-control-center:v0.5.0'
command:
- /bin/sh
- -c
# Patch /etc/hosts to support resolving host.docker.internal to the internal IP address used by the host in all OSes
- echo "`ip route | grep default | cut -d ' ' -f3` host.docker.internal" | tee -a /etc/hosts > /dev/null && java -jar /jhipster-control-center.jar
environment:
- _JAVA_OPTIONS=-Xmx512m -Xms256m
- SPRING_PROFILES_ACTIVE=prod,api-docs,static,oauth2
# For keycloak to work, you need to add '127.0.0.1 keycloak' to your hosts file
- SPRING_SECURITY_OAUTH2_CLIENT_PROVIDER_OIDC_ISSUER_URI=http://keycloak:9080/realms/jhipster
- SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_ID=jhipster-control-center
- SPRING_SECURITY_OAUTH2_CLIENT_REGISTRATION_OIDC_CLIENT_SECRET=jhipster-control-center
- SPRING_CLOUD_DISCOVERY_CLIENT_SIMPLE_INSTANCES_SASIEDZI_0_URI=http://host.docker.internal:8080
- LOGGING_FILE_NAME=/tmp/jhipster-control-center.log
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:7419:7419
+39
View File
@@ -0,0 +1,39 @@
#!/bin/bash
echo "The application will start in ${JHIPSTER_SLEEP}s..." && sleep ${JHIPSTER_SLEEP}
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [[ ${!var:-} && ${!fileVar:-} ]]; then
echo >&2 "error: both $var and $fileVar are set (but are exclusive)"
exit 1
fi
local val="$def"
if [[ ${!var:-} ]]; then
val="${!var}"
elif [[ ${!fileVar:-} ]]; then
val="$(< "${!fileVar}")"
fi
if [[ -n $val ]]; then
export "$var"="$val"
fi
unset "$fileVar"
}
file_env 'SPRING_DATASOURCE_URL'
file_env 'SPRING_DATASOURCE_USERNAME'
file_env 'SPRING_DATASOURCE_PASSWORD'
file_env 'SPRING_LIQUIBASE_URL'
file_env 'SPRING_LIQUIBASE_USER'
file_env 'SPRING_LIQUIBASE_PASSWORD'
file_env 'JHIPSTER_REGISTRY_PASSWORD'
exec java ${JAVA_OPTS} -noverify -XX:+AlwaysPreTouch -Djava.security.egd=file:/dev/./urandom -cp /app/resources/:/app/classes/:/app/libs/* "com.sasiedzi.event.SasiedziApp" "$@"
+32
View File
@@ -0,0 +1,32 @@
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: sasiedzi
services:
keycloak:
image: quay.io/keycloak/keycloak:25.0.1
command: 'start-dev --import-realm'
volumes:
- ./realm-config:/opt/keycloak/data/import
- ./realm-config/keycloak-health-check.sh:/opt/keycloak/health-check.sh
environment:
- KC_DB=dev-file
- KEYCLOAK_ADMIN=admin
- KEYCLOAK_ADMIN_PASSWORD=admin
- KC_FEATURES=scripts
- KC_HTTP_PORT=9080
- KC_HTTPS_PORT=9443
- KC_HEALTH_ENABLED=true
- KC_HTTP_MANAGEMENT_PORT=9990
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:9080:9080
- 127.0.0.1:9443:9443
healthcheck:
test: 'bash /opt/keycloak/health-check.sh'
interval: 5s
timeout: 5s
# Increased retries due to slow Keycloak startup in GitHub Actions using MacOS
retries: 50
start_period: 10s
labels:
org.springframework.boot.ignore: true
+31
View File
@@ -0,0 +1,31 @@
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: sasiedzi
services:
prometheus:
image: prom/prometheus:v2.55.0
volumes:
- ./prometheus/:/etc/prometheus/
command:
- '--config.file=/etc/prometheus/prometheus.yml'
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:9090:9090
# On MacOS, remove next line and replace localhost by host.docker.internal in prometheus/prometheus.yml and
# grafana/provisioning/datasources/datasource.yml
network_mode: 'host' # to test locally running service
grafana:
image: grafana/grafana:11.3.0
volumes:
- ./grafana/provisioning/:/etc/grafana/provisioning/
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
- GF_USERS_ALLOW_SIGN_UP=false
- GF_INSTALL_PLUGINS=grafana-piechart-panel
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:3000:3000
# On MacOS, remove next line and replace localhost by host.docker.internal in prometheus/prometheus.yml and
# grafana/provisioning/datasources/datasource.yml
network_mode: 'host' # to test locally running service
+20
View File
@@ -0,0 +1,20 @@
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: sasiedzi
services:
postgresql:
image: postgres:17.0
# volumes:
# - ~/volumes/jhipster/sasiedzi/postgresql/:/var/lib/postgresql/data/
environment:
- POSTGRES_USER=sasiedzi
- POSTGRES_PASSWORD=password
- POSTGRES_HOST_AUTH_METHOD=trust
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U $${POSTGRES_USER}']
interval: 5s
timeout: 5s
retries: 10
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:5432:5432
+31
View File
@@ -0,0 +1,31 @@
# Sample global config for monitoring JHipster applications
global:
scrape_interval: 15s # By default, scrape targets every 15 seconds.
evaluation_interval: 15s # By default, scrape targets every 15 seconds.
# scrape_timeout is set to the global default (10s).
# Attach these labels to any time series or alerts when communicating with
# external systems (federation, remote storage, Alertmanager).
external_labels:
monitor: 'jhipster'
# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
- job_name: 'prometheus'
# Override the global default and scrape targets from this job every 5 seconds.
scrape_interval: 5s
# scheme defaults to 'http' enable https in case your application is server via https
#scheme: https
# basic auth is not needed by default. See https://www.jhipster.tech/monitoring/#configuring-metrics-forwarding for details
#basic_auth:
# username: admin
# password: admin
metrics_path: /management/prometheus
static_configs:
- targets:
# On MacOS, replace localhost by host.docker.internal
- localhost:8080
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
#!/bin/bash
exec 3<>/dev/tcp/localhost/9990
echo -e "GET /health/ready HTTP/1.1\nhost: localhost:9990\n" >&3
timeout --preserve-status 1 cat <&3 | grep -m 1 status | grep -m 1 UP
ERROR=$?
exec 3<&-
exec 3>&-
exit $ERROR
+11
View File
@@ -0,0 +1,11 @@
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: sasiedzi
services:
postgresql:
extends:
file: ./postgresql.yml
service: postgresql
keycloak:
extends:
file: ./keycloak.yml
service: keycloak
+15
View File
@@ -0,0 +1,15 @@
# This configuration is intended for development purpose, it's **your** responsibility to harden it for production
name: sasiedzi
services:
sonar:
container_name: sonarqube
image: sonarqube:10.7.0-community
# Forced authentication redirect for UI is turned off for out of the box experience while trying out SonarQube
# For real use cases delete SONAR_FORCEAUTHENTICATION variable or set SONAR_FORCEAUTHENTICATION=true
environment:
- SONAR_FORCEAUTHENTICATION=false
# If you want to expose these ports outside your dev PC,
# remove the "127.0.0.1:" prefix
ports:
- 127.0.0.1:9001:9000
- 127.0.0.1:9000:9000