-
-
Save atonb117/ff3a244cda4ebddd1314b5bd8a640ec0 to your computer and use it in GitHub Desktop.
Deploy Reaction Commerce on Digital Ocean with Nginx and a Let's Encrypt SSL certificate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# start a server on Digital Ocean | |
# https://docs.docker.com/machine/drivers/digital-ocean/ | |
docker-machine create \ | |
--driver digitalocean \ | |
--digitalocean-access-token <YOUR API KEY> \ | |
--digitalocean-size 2gb \ | |
reaction | |
# tell Docker to run commands on that server | |
eval "$(docker-machine env reaction)" | |
# Nginx | |
# https://github.com/jwilder/nginx-proxy | |
docker run -d -p 80:80 -p 443:443 \ | |
--name nginx-proxy \ | |
-v /opt/certs:/etc/nginx/certs:ro \ | |
-v /etc/nginx/vhost.d \ | |
-v /usr/share/nginx/html \ | |
-v /var/run/docker.sock:/tmp/docker.sock:ro \ | |
jwilder/nginx-proxy | |
# Let's Encrypt | |
# https://github.com/JrCs/docker-letsencrypt-nginx-proxy-companion | |
docker run -d \ | |
--name lets-encrypt \ | |
--volumes-from nginx-proxy \ | |
-v /opt/certs:/etc/nginx/certs:rw \ | |
-v /var/run/docker.sock:/var/run/docker.sock:ro \ | |
jrcs/letsencrypt-nginx-proxy-companion | |
# Reaction | |
# https://github.com/reactioncommerce/reaction | |
docker run -d \ | |
--name reaction \ | |
--restart always \ | |
-e MONGO_URL="mongodb://some-url" \ | |
-e ROOT_URL="https://yoursite.com" \ | |
-e VIRTUAL_HOST="yoursite.com" \ | |
-e LETSENCRYPT_EMAIL="your.email@example.com" | |
-e LETSENCRYPT_HOST="yoursite.com" | |
reactioncommerce/reaction:latest | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
MONGO_URL ?? , how do I set it, how does Mongodb get setup? I am using digital ocean