Skip to content
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 documentation about deployment #1193

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

fabcor-maxiv
Copy link
Contributor

@fabcor-maxiv fabcor-maxiv commented Mar 22, 2024

docs/source/dev/deployment.md Outdated Show resolved Hide resolved
docs/source/dev/deployment.md Outdated Show resolved Hide resolved
@fabcor-maxiv
Copy link
Contributor Author

fabcor-maxiv commented Mar 22, 2024

@axelboc What about the JavaScript part? Anything that could be mentioned? What should one pay attention to when deploying for production regarding the JavaScript part? Some special flags to set when building? Anything like that?

@fabcor-maxiv fabcor-maxiv force-pushed the add-doc-deployment branch 3 times, most recently from 0fa0c52 to c271406 Compare March 22, 2024 15:41
@axelboc
Copy link
Collaborator

axelboc commented Mar 22, 2024

@axelboc What about the JavaScript part? Anything that could be mentioned? What should one pay attention to when deploying for production regarding the JavaScript part? Some special flags to set when building? Anything like that?

Well, I guess you could copy the steps from the README: 1) install the front-end dependencies with pnpm --prefix ui install; 2) build the front-end with pnpm --prefix ui build 3) point maxcube-server to where the built files are located (ui/build).

There's a .env file in the ui folder but it's meant to be removed. I don't see anything else but @marcus-oscarsson may have a better idea.

@marcus-oscarsson
Copy link
Member

Yes the .env file is no longer used and can be removed.

@marcus-oscarsson
Copy link
Member

I'm wondering if we should not provide a pre-built UI and bundle that with the python package.

@marcus-oscarsson
Copy link
Member

Should we make sure that there is a requirements.txt that is up to date in the repository if we recommend using pip for deployment or de we leave that up to each and everyone to decide ?

@marcus-oscarsson
Copy link
Member

Thanks, looks good to me !

@axelboc
Copy link
Collaborator

axelboc commented Apr 3, 2024

I'm wondering if we should not provide a pre-built UI and bundle that with the python package.

If there are no longer any environment variables and no other build-time configuration, then for sure! Not having to build the front-end would definitely make deployment simpler.

@fabcor-maxiv
Copy link
Contributor Author

fabcor-maxiv commented Apr 4, 2024

I'm wondering if we should not provide a pre-built UI and bundle that with the python package.

I can not think of a way to do this that would not be a pain, but I have not thought about it very long. If someone comes up with a good solution, then that would be great of course.

Should we make sure that there is a requirements.txt that is up to date in the repository if we recommend using pip for deployment or de we leave that up to each and everyone to decide ?

Yes, I have already experimented with this a bit. I think with pre-commit hooks it can be done without too much pain and suffering inflicted on contributors. But I would do it in a separate effort (pull request).

There's a .env file in the ui folder but it's meant to be removed. I don't see anything else but @marcus-oscarsson may have a better idea.

Yes the .env file is no longer used and can be removed.

No idea about this. Feel free to do it in a separate pull request, I guess.

@marcus-oscarsson
Copy link
Member

I see, I think that if we agree that we should use pip for deployment then we should IMO make sure that there is either a script that generates the requirements.txt and performs the pip install or automatically create the requirements.txt

@marcus-oscarsson
Copy link
Member

I think we can come up with a way to build and bundle the UI with the python package in someway.

@fabcor-maxiv
Copy link
Contributor Author

@marcus-oscarsson @axelboc dedicated issues to discuss the tangential topics:

@fabcor-maxiv
Copy link
Contributor Author

I have thought about adding a section about the Javascript UI part that would not be a complete copy/paste of the other page, and I can not come up with anything. So I rather leave this out. We can always add something when we have something concrete to write that is actual additional information.

So I guess this is ready to be merged from my point of view.

@fabcor-maxiv fabcor-maxiv force-pushed the add-doc-deployment branch 2 times, most recently from 039a06a to c09e3f1 Compare April 12, 2024 14:58
@marcus-oscarsson marcus-oscarsson merged commit 40db862 into mxcube:develop Apr 15, 2024
7 checks passed
@fabcor-maxiv fabcor-maxiv deleted the add-doc-deployment branch April 15, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants