-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Cobalt Web image Dockerfile #1366
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Build and run image with ``` docker build -f web/Dockerfile -t cobalt-web . docker run -e WEB_DEFAULT_API="https://real.api.endpoint" -e WEB_HOST="http://abc" -e WEB_PLAUSIBLE_HOST="def" -p 800:80 cobalt-web ``` Currently, vite build still uses process.env env-vars at build time, so the docker container is not using those defined via placeholders in `runtime-config.js`
Should use Caddy instead of NGINX. This is my Dockerfile for hosting web: https://github.com/caninetools/cobalt/blob/main/docker-build/Dockerfile-web |
Thanks for getting back @hyperdefined with the direction about using Caddy. I cannot comment on the issue thread or PR anymore. This is a fake commit to comment: do you want to edit the PR with your Dockerfile and make the vars editable via docker container env_vars?
Thanks for getting back @hyperdefined with the direction about using Caddy. |
I swapped to Caddy since I like it better personally, and I like how it's more lightweight. As for the environment variables, they are in the build file itself. You can edit them yourself or manually copy in a The site is built in the container before it's published, so passing in environment variables during runtime won't do anything. It has to be done before it's built. |
Thanks again for getting back! What's the point-of-view of the team regarding nginx vs Caddy for this Also, this PR uses a |
bump |
I tried to build image by following your instruction, but it didn't worked docker build output
|
Build and run image with
Currently, vite build still uses process.env env-vars at build time, so the docker container is not using those defined via placeholders in
runtime-config.js