-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Quick Start Full Bench Support Deployment #858
Comments
I can see in V14 modules (Healthcare, Non-profit etc.) are moving to separate apps. The ability to install these apps on the fly will be important I think. |
I'm not doing this (That means no one else will). You're free to send PR. What I already do is build staging images just like production images.
Developers use I prefer the environments remain same for staging and production. Easier to replicate issues on staging that way. |
@revant Thanks for describing in detail what your process is. I think you're right, it's probably better if staging and production are the same, but not everyone is comfortable with more advanced docker flows as you outlined above. It's just not accessible for most devs; even those who use docker regularly. I'll consider making a PR. Do you think the development containers stack could handle low traffic in production? |
refer these templates https://github.com/castlecraft/benchless/tree/master/templates you'll need to start nginx with supervisor
|
for single developer, "I push to remote, pull from remote to vm" workflow makes sense. We've multiple devs working on multiple sites and multiple apps, devops is automated by ci/cd to reduce confusion of who updated what last and devs can focus on releasing features multiple times a day than focusing on managing VM. |
Yes, that makes sence. I think I will make a PR in the next couple months. |
I'll close this Issue. Whenever you start the work on PR we can initiate new Issue/PR for discussion. |
Started working on this here: |
I made this gist to use development bench for production. You need to additionally install nginx and supervisor. https://gist.github.com/revant/010c058f7c485cc62f2cc4d604ab8511 If you use it in production and happy with usage, we'll add nginx and supervisor in frappe/bench image. |
Thanks for that, I missed your gist. Is the work I did with separating the files still worth while? Could you explain why Nginx has to run inside the frappe bench container, could it run in it's own container with some shared folders? |
if nginx and supervisor runs in Frappe bench container then we can just reuse current devcontainer-example just like mentioned in gist
less containerized setup. more like a vm setup. if you wish to have separate containers use existing stable production setup. check this to use supervisor to run nginx https://www.novixys.com/blog/python-web-application-docker-nginx-uwsgi/#6_Supervisor For TLS certificates and https access to sites under benches some volume mounting and configuration should make the certificates available for use by nginx. Renewal cron job needs to be figured out. |
hmmmm I see.. I'll see what I can come up with. As always, thanks for the information. |
Still testing with this, so perhaps don't close it yet. |
Things where going very well but I've hit a snag with SSL. I successfully implemented certbot to very easily get ssl certificates generated and put where they belong. Now Nginx was supposed to dish up ssl certifactes based on the hostname, but apparently, it can't do that? @revant's code kinda indicates it should, but the internet says dynamically loading certificates with host names isn't doable. Am I missing something?
|
I didn't test benchless with ssl. If we have bench why do we need |
That's where I started, but the output didn't contain any details regarding SSL so I assumed it wasn't supported. I think maybe I missed that the ssl certificates needs to be added to the site. https://frappeframework.com/docs/v14/user/en/bench/guides/lets-encrypt-ssl-setup My only hesitation with the auto-created config is it seems to put each site on a different port, is this correct? |
in case of dns multitenant it should create each site with site_name in case of port based multi tenant site gets created on different port. refer: https://frappeframework.com/docs/v14/user/en/bench/guides/setup-multitenancy#dns-based-multitenancy |
https://github.com/castlecraft/frappe_containers @1ubuntuuser check this. it's single image that acts as different containers It can be used as immutable container in traditional containerized setup and volume creation/cleanup will be handled by container engine. check |
Is your feature request related to a problem? Please describe.
Not all frappe bench commands work. Currently, the production deployment requires apps to be built into docker images. This slows down the setup and means you can't quickly experiment with different apps in pre-production environment.
Describe the solution you'd like
A halfway point between full static deployment with multiple containers and the development containers stack to be used for testing out different apps and small scale deployments. Once you are happy with your apps and setup, you can choose to build the static frappe docker stack for performance and scale.
Describe alternatives you've considered
Additional context
I'm happy for this to be shot down as a dumb idea. The performance of the development stack might be terrible. I don't know. My use case is I am building a system that initially will only need to support 20-40 users. I want to be able to interatively improve the interface/apps and at some point I want to the option to change over to the static production version to support hopefully many thousands of users. #811 See conversation on this here.
I don't mind the bloated size. It's big, but my alternative to erpnext was a mashup with 5 different apps.
Requirments
##Thoughts, suggestions, ideas?
The text was updated successfully, but these errors were encountered: