Allow custom ports and environment #77
Allow custom ports and environment #77jaredlander wants to merge 41 commits intoopenanalytics:masterfrom
Conversation
…ment variables Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
…tions Add Copilot instructions for repository
…urable Make Caddy container ports configurable via environment variables
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
- Reverted previous implementation that read from ShinyProxy spec - Now reads environment variables from operator's environment with SHINYPROXY_ENV_ prefix - Environment variables are passed to ShinyProxy container with prefix stripped - This allows using docker-compose env files for secrets without plain text in configs - Added comprehensive documentation with examples Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
- Validate that target key is not empty after stripping prefix - Validate that values don't contain newline characters (security) - Log warnings for invalid environment variables - Update documentation with validation rules Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
- Added Dockerfile.build for building in a container with Maven and JDK 21 - Added docker-compose.build.yml for easy Docker-based builds - Added devbox.json configuration for Devbox development environment - Added BUILD.md with comprehensive build instructions for all options - Users can now build without installing Maven/JDK locally Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
- Changed from 'mvn clean install' to 'mvn clean package -DskipTests' for faster builds - 'package' is sufficient for creating the JAR without installing to local repository - Updated Dockerfile.build, BUILD.md, and devbox.json consistently - Addresses user feedback on build command Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
…ld simply output the artifact. Removed the docker compose option.
… up mvn dependencies and for packaging without tests. Updated BUILD.md to reflect these changes.
…proxy Pass environment variables from operator to ShinyProxy Docker containers
…y caddy and shinyproxy still use the regular ports they expect.
…via secret Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
…y support Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
Co-authored-by: jaredlander <628977+jaredlander@users.noreply.github.com>
…ld-test Add GitHub Actions workflow for building and pushing Docker images to Azure Container Registry
…by shinyproxy-orchestraotr.
…RT_0 so that we can add additional config imports and spring.config.import is no longer a forbidden configuration.
|
Hi @LEDfan I know I added a bunch of stuff to this PR, including scaffolding like devbox and CI/CD. Is there anything I can chop away to make this easier for you to merge? |
|
Hi @jaredlander first of all thank you for creating this PR and your patience. I understand the need for passing environment variables, but I see a few problems with your current approach:
We recently needed this feature for a customer and took a different approach (which is similar to Docker secrets):
Similar to environment variables, you can use these in the main configuration file using With this approach we solve the main reason to use environment variables, i.e. moving "secrets" outside your main file (which is typically stored in Git). However, I think this approach is a little bit more secure, and much more user friendly (because of the automatic reload). I just pushed this code to the develop branch of this repo. Regarding your other changes:
So I'm happy to accept these smaller changes, and hope the |
Passing Environment Variables to shinyproxy
This allows users to pass environment variables through shinyproxy-operator (via docker compose) to the shinyproxy container as requested in #66.
When setting the variable set it with a
SHINYPROXY_ENV_prefix. For example settingSHINYPROXY_ENV_TEST_VAR: test_valuewill result in the shinyproxy-operator container have an environment variable namedSHINYPROXY_ENV_TEST_VARwith a value oftest_valueAND the shinyproxy container will have an environment variable namedTEST_VARwith a value oftest_value.Setting Custom Ports
This allows users to specify ports for caddy using
SPO_CADDY_PORT_HTTPandSPO_CADDY_PORT_HTTPSas requested in #65. This will change the external ports for caddy but everything internally will still be on the standard 80/443 ports.Automatic Image Building
Added a GitHub Action to automatically build the operator image and push to a registry as set in the repo secretes.