Skip to content

Instantly share code, notes, and snippets.

@jumbojett
Forked from slowprog/docker-compose.yml
Last active August 19, 2022 07:44
Show Gist options
  • Save jumbojett/9a8c7b61573ac339ff6c159b274bc40b to your computer and use it in GitHub Desktop.
Save jumbojett/9a8c7b61573ac339ff6c159b274bc40b to your computer and use it in GitHub Desktop.
Docker-compose for rancher, nginx and let's encrypt
version: '2'
services:
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- "/etc/nginx/vhost.d"
- "/usr/share/nginx/html"
- "/var/run/docker.sock:/tmp/docker.sock:ro"
- "/home/docker/nginx-proxy/ssl:/etc/nginx/certs:ro"
letsencrypt-nginx-proxy-companion:
image: jrcs/letsencrypt-nginx-proxy-companion:latest
volumes_from:
- nginx-proxy
volumes:
- '/home/docker/nginx-proxy/ssl:/etc/nginx/certs:rw'
- '/var/run/docker.sock:/var/run/docker.sock:ro'
rancher-server:
image: rancher/server:latest
environment:
VIRTUAL_PORT: $VIRTUAL_PORT
VIRTUAL_HOST: $VIRTUAL_HOST
LETSENCRYPT_HOST: $LETSENCRYPT_HOST
LETSENCRYPT_EMAIL: $LETSENCRYPT_EMAIL
volumes:
- "data-mysql:/var/lib/mysql"
volumes:
data-mysql:
@Samyssmile
Copy link

Can you write an example how to use it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment