-
Notifications
You must be signed in to change notification settings - Fork 13
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
Add Standalone Production config #134
base: master
Are you sure you want to change the base?
Conversation
… into add-nginx-forwarding
… into add-nginx-forwarding
Yes, that makes sense, but I prefer
I'd like to commit to nginx always being run b/c that makes the development and production environments as similar as possible (barring how brainlife.io deploys things). That is to say I think it's simpler to have 2 nginx configuration files and 1 env file then to have multiple docker compose files, but that solution while being simpler to me may not be the best path forward.
It was required as the health checks were failing when reaching out to
Yeah, I had some similar remarks about the run/build process, but I think it's helpful to keep in mind that this is not how ezbids is deployed on brainlife.io. Technically speaking, everything we've been doing has been "non-production" compared to how this project was originally scoped/intended to work. I agree and will be working today to streamline the launch/build process to better leverage:
When I requested my ssl certs I encrypted the keys, I'm not sure of a clever way around this within the nginx config. Before we think too much on this, could you try running the
No idea either, but I think consolidation is the word of the week for my branch. |
ui/Dockerfile-production
Outdated
|
||
RUN npm install | ||
|
||
CMD [ "npm", "run", "build"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So when I switch over to using the build
option it seems to break my application and make it unusable. Do the options build
and dev
that get used in this docker file correspond to this ->
Lines 4 to 8 in 8ddb0a0
"scripts": { | |
"dev": "vite --host", | |
"build": "vite build --base=/ezbids/", | |
"serve": "vite preview" | |
}, |
Really not sure what exactly is all going on here, but it feels like we're pretty close...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What further confuses me is what effect this vite config has, see ->
Lines 8 to 20 in 8ddb0a0
export default defineConfig({ | |
base: '/ezbids/', | |
plugins: [ | |
vue(), | |
Components({ | |
resolvers: [ElementPlusResolver()], | |
}), | |
ViteYaml(), | |
], | |
build: { | |
sourcemap: true, | |
}, | |
}); |
Is this at all related to the page refreshing?
update nginx.conf
Hey everyone, I've been working with @bendhouseart to improve the setup and deployment on production especially for a setup where client and handler run on different machines. I the context of that we:
We tested both setup on our local infrastructure. Please let me know if anything else is missing ot get this merged. (Not sure why the dev.sh file is marked as a conflict, this PR should remove the dev.sh file) Best |
Yeah, I went ahead an closed the original PR as they've converged now with this. Currently able to launch this in either "production" or "dev" mode and confident enough to say lgtm. |
Following the excellent work by Anthony I split the nginx into a proper config production which doesnt use the vite development server.
I still have a few open questions/remarks I want to discuss:Env File, imo we should put the .env into version control, just an example of it. My prefered solution would be to create a file calleddone, created example.env.env-example
and .gitignore the.env
file.The development version as provided right now is not really working, as the vite can't access the wss for HMR. I would ask the question if we should really use nginx for the dev setup. Happy for your input here.done, removed nginx for dev setupHealthchecks: @bendhouseart Your changes to the healthchecks in the compose file, didn't work for me. What was the point behind your changes?doneStartup scripts (dev.sh and prod.sh) I see the benefit of those files (git submodules & key generation) but also would try to look for a streamlining of the storage of environment variables (script vs. .env) and the duplication of code between the dev and prod file. + I don't completly understand why the npm dependencies are installed in that script and not in the Dockerfiles of the corresponding containers. Option might be to merge dev and prod into a start.sh with more flags.done launch.sh is the entrypoint for now, configuration can be done via .env fileNginx config file, I think this a good starting point, not sure tho how far we can go with this as setups are quiet different (e.g. we have dont have our cert key encrypted and as a result don't have a ssl_password_file. Thus the nginx fails. Maybe remove the config from the code repo and put it into the documentation as an example instead?done, sticking to versioning the nginx config for now :)The api still runs in dev mode more or less. Didn't completly get what the start.sh is used for here (maybe nowhere at all?). Might have time to tackle that in the next few days.this is still undone, but for now out of the scope of this PR.Happy for your input.
Best,
Tim