Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "Start backend containers",
"type": "shell",
"command": "NX_TUI=false NX_DAEMON=false bash ./start-backend-containers.sh",
"isBackground": false,
"problemMatcher": []
},
{
"label": "Check backend container status",
"type": "shell",
"command": "docker ps --format '{{.Names}} {{.Status}} {{.Ports}}'",
"isBackground": false,
"problemMatcher": []
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ WEBSOCKET_CORS_ORIGIN=
WEBSOCKET_NAMESPACE=socket/clients

# Environment variables for the authentication method
# AUTHENTICATION_METHOD: api-key | keycloak | users (default: api-key when STATIC_API_KEY set, else keycloak)
# AUTHENTICATION_METHOD: api-key | keycloak | users (default: users)
# - api-key: Static API key auth (requires STATIC_API_KEY)
# - keycloak: Keycloak OAuth2 (requires Keycloak env vars)
# - users: Built-in user registration with JWT (requires JWT_SECRET)
AUTHENTICATION_METHOD=api-key
AUTHENTICATION_METHOD=users

# Environment variables for disabling signup
DISABLE_SIGNUP=false
Expand Down Expand Up @@ -133,9 +133,9 @@ DYNAMIC_PROVIDERS_FAIL_FAST=false
DYNAMIC_PROVIDER_PLUGIN_PATH=
DYNAMIC_PROVIDER_PLUGIN_INSTALL=
CLIENT_ENDPOINT_ALLOWED_HOSTS=
CLIENT_ENDPOINT_ALLOW_INSECURE_HTTP=false
CLIENT_ENDPOINT_ALLOW_INTERNAL_HOST=false
CLIENT_ENDPOINT_TLS_REJECT_UNAUTHORIZED=true
CLIENT_ENDPOINT_ALLOW_INSECURE_HTTP=true
CLIENT_ENDPOINT_ALLOW_INTERNAL_HOST=true
CLIENT_ENDPOINT_TLS_REJECT_UNAUTHORIZED=false
KEYCLOAK_SERVER_URL=
KEYCLOAK_AUTH_SERVER_URL=
KEYCLOAK_REALM=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ WEBSOCKET_CORS_ORIGIN=
# Encryption key for sensitive data (base64 encoded)
ENCRYPTION_KEY=MDEyMzQ1Njc4OTAxMjM0NTY3ODkwMTIzNDU2Nzg5MDE=

# Authentication method: api-key | keycloak | users
# Authentication method: api-key | keycloak | users (default: users)
# - api-key: Static API key auth (requires STATIC_API_KEY)
# - keycloak: Keycloak OAuth2 (requires Keycloak env vars)
# - users: Built-in user registration with JWT (requires JWT_SECRET)
AUTHENTICATION_METHOD=api-key
AUTHENTICATION_METHOD=users

# Environment variables for disabling signup
DISABLE_SIGNUP=false
Expand Down
113 changes: 0 additions & 113 deletions hooks.sh

This file was deleted.

41 changes: 41 additions & 0 deletions start-backend-containers.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
set -euo pipefail

ROOT_DIR="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)"
cd "$ROOT_DIR"

backend_apps=(
"agenstra/backend-agent-controller:agenstra-backend-agent-controller"
"agenstra/backend-agent-manager:agenstra-backend-agent-manager"
"decabill/backend-billing-manager:decabill-backend-billing-manager"
"forepath/backend-communication:forepath-backend-communication"
)

for app in "${backend_apps[@]}"; do
app_dir="${app%%:*}"
example="$ROOT_DIR/apps/$app_dir/.start-containers.env.example"

if [[ ! -f "$example" ]]; then
printf 'Missing env example: %s\n' "$example" >&2
exit 1
fi
done

for app in "${backend_apps[@]}"; do
app_dir="${app%%:*}"
example="$ROOT_DIR/apps/$app_dir/.start-containers.env.example"
env_file="$ROOT_DIR/apps/$app_dir/.start-containers.env"

if [[ ! -e "$env_file" && ! -L "$env_file" ]]; then
cp -- "$example" "$env_file"
printf 'Created %s\n' "$env_file"
else
printf 'Preserving existing %s\n' "$env_file"
fi
done

for app in "${backend_apps[@]}"; do
project="${app#*:}"
printf '\nStarting %s\n' "$project"
npx nx run "$project:start-containers"
done
Loading