Skip to content

Commit

Permalink
chore(local-dev): allow to run docker image locally with SSL (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
mijailr authored Jan 15, 2025
1 parent d639943 commit 9eef575
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ dist/
# misc
.DS_Store
*.pem
*.key
*.crt

# debug
npm-debug.log*
Expand Down
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,18 +182,18 @@ This script will:
2. Run the container with SSL enabled:

```bash
docker run --rm -d \
docker run --rm \
-e SSL=enabled \
-v $(pwd)/ssl:/ssl \
-e NEXTAUTH_URL='https://localhost:3443' \
-e NEXTAUTH_SECRET='your-secret-here' \
-e KEYCLOAK_HOST='http://localhost:8888' \
-e KEYCLOAK_REALM='default' \
-e KEYCLOAK_CLIENT_ID='sso-workflow-bridge-client' \
-e KEYCLOAK_CLIENT_SECRET=' ' \
-v ./local-dev/ssl:/ssl \
-e AUTH_URL='https://localhost:3443' \
-e AUTH_SECRET='your-secret-here' \
-e AUTH_KEYCLOAK_HOST='http://localhost:8888' \
-e AUTH_KEYCLOAK_REALM='default' \
-e AUTH_KEYCLOAK_CLIENT_ID='sso-workflow-bridge-client' \
-e AUTH_KEYCLOAK_CLIENT_SECRET=' ' \
-e LHUT_API_URL='http://localhost:8089' \
-p 3000:3000 -p 3443:3443 \
ghcr.io/littlehorse-enterprises/sso-workflow-bridge/sso-workflow-bridge-ui:main
ghcr.io/littlehorse-enterprises/lh-sso-workflow-bridge/lh-sso-workflow-bridge-ui:main
```

When SSL is enabled, the UI will be available on:
Expand Down
8 changes: 4 additions & 4 deletions local-dev/issue-certificates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ echo "Creating SSL Certificates"
openssl req -x509 -sha256 -nodes \
-days 3650 -newkey rsa:2048 \
-subj '/O=LH User Tasks/CN=localhost' \
-keyout "$SSL_PATH/key.pem" \
-out "$SSL_PATH/cert.pem" \
-keyout "$SSL_PATH/tls.key" \
-out "$SSL_PATH/tls.crt" \
-addext "subjectAltName = DNS:localhost" > /dev/null 2>&1

echo "Certificates generated successfully in $SSL_PATH/"
echo "- cert.pem: SSL certificate"
echo "- key.pem: Private key"
echo "- tls.crt: SSL certificate"
echo "- tls.key: Private key"

0 comments on commit 9eef575

Please sign in to comment.