The directory contains docker-composer files allowing to set up environment.
kafka and kafdropURLs:
For build service’s images (tts, cards, dictionaries, settings, translation, app) use build-images.bat or build-images.sh scripts.
Example commands to deploy environment:
docker-compose -f docker-compose-app.yml up flashcards-db flashcards-keycloak flashcards-nats flashcards-envoy
docker-compose -f docker-compose-elk-stack.yml -p flashcards-elk-stack up
1) generate self-signed certificates:
mkdir tutor-deploy/data/envoy/certs
cd tutor-deploy/data/envoy/certs
openssl genrsa -out server.key 2048
openssl req -new -x509 -key server.key -out server.crt -days 365 -subj "/CN=localhost"
chmod 644 server.crt server.key
2) configure envoy.yml:
port_value: 443issuer: "https://localhost/realms/flashcards-realm"filters add following section: - filters
...
transport_socket:
name: envoy.transport_sockets.tls
typed_config:
"@type": type.googleapis.com/envoy.extensions.transport_sockets.tls.v3.DownstreamTlsContext
common_tls_context:
tls_certificates:
- certificate_chain:
filename: "/etc/envoy/certs/server.crt"
private_key:
filename: "/etc/envoy/certs/server.key"
3) change docker-compose-app.yml:
KC_HOSTNAME_URL: "https://localhost/" & KC_HOSTNAME_ADMIN_URL: "https://localhost/" & KC_HOSTNAME_PORT: "443"ports: - "443:443" & uncomment - "${DATA_DIR}/envoy/certs:/etc/envoy/certs"KEYCLOAK_AUTHORIZE_ADDRESS: "https://localhost" & KEYCLOAK_REDIRECT_ADDRESS: "https://localhost"4) docker-compose -f docker-compose-app.yml up
5) go to https://localhost/admin/master/console -> flashcards-realm -> flashcards-client
6) set redirect url to https://localhost/*
7) the application should be available via https://localhost/