Created
April 19, 2017 21:01
-
-
Save nonamenix/0f3c8abb1d4b8d03d847ff44cb5c6448 to your computer and use it in GitHub Desktop.
How to run your pet project with nginx + letsencrypt + condo
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
{ | |
:spec { | |
:Name "letsencrypt_companion" | |
:Image "jrcs/letsencrypt-nginx-proxy-companion" | |
:HostConfig { | |
:Env [ | |
"NGINX_PROXY_CONTAINER=nginx_proxy" | |
] | |
:Binds [ | |
"/var/run/docker.sock:/var/run/docker.sock:ro" | |
"/etc/nginx/certs:/etc/nginx/certs:rw" | |
] | |
:VolumesFrom [ | |
"nginx_proxy:rw" | |
] | |
:NetworkMode "petprojects_default" | |
} | |
} | |
:health-timeout 45 | |
} |
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
{ | |
:spec { | |
:Name "nginx_proxy" | |
:Image "jwilder/nginx-proxy:0.4.0" | |
:Env ["DEFAULT_HOST=whoami"] | |
:HostConfig { | |
:Binds [ | |
"/var/run/docker.sock:/tmp/docker.sock:ro" | |
"/etc/nginx/certs:/etc/nginx/certs:ro" | |
] | |
:PortBindings { | |
"80/tcp" [{:HostPort "80"}] | |
"443/tcp" [{:HostPort "443"}] | |
} | |
:NetworkMode "petprojects_default" | |
} | |
:Volumes { | |
"/etc/nginx/vhost.d" { } | |
"/usr/share/nginx/html" { } | |
} | |
} | |
} |
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
{ | |
:spec { | |
:Name "whoami" | |
:Image "jwilder/whoami" | |
:Env [ | |
"VIRTUAL_HOST=whoami.nonamenix.ru" | |
"VIRTUAL_PORT=8000" | |
"LETSENCRYPT_HOST=whoami.nonamenix.ru" | |
"[email protected]" | |
] | |
:HostConfig { | |
:RestartPolicy {:Name "always"} | |
:NetworkMode "petprojects_default" | |
} | |
} | |
:health-timeout 45 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment