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

Installing for production #87

Open
zerotraceme opened this issue Feb 18, 2022 · 5 comments · May be fixed by #147
Open

Installing for production #87

zerotraceme opened this issue Feb 18, 2022 · 5 comments · May be fixed by #147

Comments

@zerotraceme
Copy link

Is there documentation on how to setup for production? Just read that this docker image is for local dev and evaluation only...
Ideally there would be a docker-compose that'd just work.

I'd be happy to write a setup and provide the docker-compose once I get it to work, but not sure where to start or if it's even possible to host for production.

Any hints or tutorials I've missed?

@johncadengo
Copy link

Also interested in this. @leprodude any progress on the docker-compose?

@zerotraceme
Copy link
Author

I've been able to build and host it, but somehow my database wasn't initialising properly, so I couldn't use it.
I've decided to wait a bit, as the code base is being switched etc. but at some point I'll try again and post an update here if I get it to work properly

@johncadengo
Copy link

@leprodude thanks for the info. Did you try initializing your own production docker image rather than starting with this as a base?

@zerotraceme
Copy link
Author

Honestly I don't remember atm. I probably just used the docker image and made some changes to the docker-compose template...

Leopere pushed a commit to Leopere/calcom-docker that referenced this issue Aug 1, 2022
- added numerous environment variable changes such as implied defaults that can be overriden.
- skipped out on using git modules and just pull repo into build/launch step.  Adherance to license requires no repackaging and this solves this.
- cleaned up now unnecessary .env file.
- recycled environment section using yaml features.
- writing a few strings to config path to persist data between container starts that focus on cryptography and secrets.
- writing installed commit to the config path in case the end user needs to change the upstream git commit ID to a newer version for detection and automagic upgrades.
- added docker-compose.override.yml pattern to .gitignore to allow users to customize their local dev environment if they use docker-compose.yml
- wrote a dockerfile/container image which allows for uploading the base container to a private or public docker container registry without breaking the license rules.
- left .env ignore in case users wish to continue to use the old method.
- updated README.md to include updated simplified instructions.
- added start.sh script and wait-for-it.sh into the shell $PATH to allow for a potential future of allowing the main executable (node JS app) to run under a limited privilege user while still allowing the init scripts to be executed securely.
- added some input sanitation for certain critical variables.
- by default disabled/commented out the studio service as its not to typically be run to enforce better default deployment practices.  I would like to figure out what specific query to execute via the CLI instead of running a whole container to establish the first user in the end.
- wrote relatively unopinionated docker-compose.yml file to avoid causing problems for people trying to deploy this behind a reverse proxy for potential features such as TLS/HTTPS termination.
- upgraded compose version to latest '3.9' to be sure to enable most modern feature set.

Fixes calcom#87 by providing a working baseline with sober defaults.
Fixes calcom#88 by ensuring consistency across all containers Environment vars.
Fixes calcom#93 by allowing users to mount the application files within their IDE workspace, however, this will never solve for any times you will need to run yarn build steps.
Fixes calcom#99 by no longer using git submodules and just pulling a single commit depth copy of the ORIGIN repository on app bootstrap/first boot.
Fixes calcom#113 by no longer requiring build locally if the community maintainer of the Cal docker repository on GitHub will push this image to the hub.
Fixes calcom#121 by removing dependency on BuildKit this is done by simply deploying the app if its detected to be the first execution of this container be it due to no container persistence or a commit version upgrade from ORIGIN.
Fixes calcom#128 by removing dep on BuildKit
Fixes calcom#123 not replicatable and confirmed to be working in repository shipped state.
Fixes calcom#136 by building app on first launch from user define-able envvars which can be defined in numerous ways.
@Leopere Leopere linked a pull request Aug 1, 2022 that will close this issue
@PhilippeAccorsi
Copy link

I tried also to install on production (first, test on local) and it is not very clear about what is wrong to use docker behind proxy on production.

The biggest problem for me is how set database for the first start. I don't understand what is necessary, also how create the first user (because some value seems to be necessary but the first user just need username, mail and password. I don't understand why more information is necessary.

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 a pull request may close this issue.

3 participants