forked from ServiceInnovationLab/korerorero-reverse-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Connie edited this page Aug 24, 2020
·
1 revision
Welcome to the korerorero-reverse-proxy wiki!
There's a staging server currently running on lightsail. Here are the commands to get it up and running (with SSL cert).
Many thanks to this post: https://aws.amazon.com/blogs/compute/building-a-pocket-platform-as-a-service-with-amazon-lightsail/
# start the reverse proxy container
sudo docker run --detach \
--name nginx-proxy \
--publish 80:80 \
--publish 443:443 \
--volume /etc/nginx/certs \
--volume /etc/nginx/vhost.d \
--volume /usr/share/nginx/html \
--volume /var/run/docker.sock:/tmp/docker.sock:ro \
jwilder/nginx-proxy
# start the letsencrypt companion
sudo docker run --detach \
--name nginx-proxy-letsencrypt \
--volumes-from nginx-proxy \
--volume /var/run/docker.sock:/var/run/docker.sock:ro \
--env "DEFAULT_EMAIL=YOUREMAILHERE" \
jrcs/letsencrypt-nginx-proxy-companion
# start a demo web server under a subdomain
sudo docker run --detach \
--name nginx \
--env "VIRTUAL_HOST=test.EXAMPLE.COM" \
--env "LETSENCRYPT_HOST=test.EXAMPLE.COM" \
nginx
Pay special attention to setting a valid email for the DEFAULT_EMAIL environment variable on the proxy companion; otherwise, you’ll need to specify the email whenever you start a new container. If everything went well, you should be able to navigate to https://test.EXAMPLE.COM and see the nginx default content with a valid SSL certificate that has been auto-generated by Let’s Encrypt.