Deploying to Staging or Production #395
EmperorKonstantin
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
Here's an example bash script that generates / renews Let's Encrypt certs. You could generate them right into the env directory (this also does Clouflare DNS auth and generates a wildcard certificate): services:
app:
volumes: &appvolumes
- ... (skip)
- ./env/ssl/live/example.com/privkey.pem:/etc/nginx/certs/nginx.key:cached
- ./env/ssl/live/example.com/fullchain.pem:/etc/nginx/certs/nginx.crt:cached # Generate wildcard Let's Encrypt certificate if it does not exist
if test -f ~./teknova/env/ssl/live/teknova.com/fullchain.pem; then
certbot certonly --email emperorkonstantin@example.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos --dns-cloudflare --dns-cloudflare-credentials ~./docker-magento/env/certbot.env --dns-cloudflare-propagation-seconds 60 --config-dir ~./ssl/ --work-dir ~./docker-magento/env/ssl/ --logs-dir ~./docker-magento/env/ssl/ -d *.example.com -d example.com
fi
# Check if any certificates need to be renewed
certbot renew --email emperorkonstantin@example.com --server https://acme-v02.api.letsencrypt.org/directory --agree-tos --dns-cloudflare --dns-cloudflare-credentials ~./docker-magento/env/certbot.env --dns-cloudflare-propagation-seconds 60 --config-dir ~./ssl/ --work-dir ~./docker-magento/env/ssl/ --logs-dir ~./docker-magento/env/ssl/
# Restart docker image to apply the SSL updates
# echo "Restarting containers to apply updates..."
( cd /home/ubuntu/docker-magento && bin/restart ) I'm still not doing a large scale deployment due to no need. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Very interested in anyone running a large scale Magento2 install on Kubernetes or anything involving git push to deploy. Please contact me directly, looking to hire someone to help with this, thanks! |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
In an ideal world, we can rely on composer working and you can simply push your commits to your git repository and then your CI/CD pipeline will handle deployment from there.
What sort of deployment setups do you guys use?
I used to push my commits to the repo, and then have webhooks setup in github or gitlab to trigger a php script on the server to do a
now with containers and Kubernetes everywhere I'm finding my deployment flow has to change... because setting up production environments is a far bigger pain than setting up a development environment. A performant Magento 2 deployment with a large amount of traffic can easily have more than 20-30 containers supporting it.
Beta Was this translation helpful? Give feedback.
All reactions