Skip to content

Instantly share code, notes, and snippets.

@fabean
Last active August 9, 2024 13:17
Show Gist options
  • Save fabean/17e88b9f7132d5a75e91d762651e9dae to your computer and use it in GitHub Desktop.
Save fabean/17e88b9f7132d5a75e91d762651e9dae to your computer and use it in GitHub Desktop.
Docker-compose for tutorial blog post
version: '2'
services:
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy:alpine
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./letsencrypt/certs:/etc/nginx/certs
- /etc/nginx/vhost.d
- /usr/share/nginx/html
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt
volumes_from:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./letsencrypt/certs:/etc/nginx/certs:rw
wiki:
container_name: wiki
image: ericbarch/dockuwiki
environment:
- SSH_PORT=22
- SSH_DOMAIN=github.com
- REMOTE_URL=git@github.com:fabean/wiki.git
- VIRTUAL_HOST=mycoolwiki.joshfabean.com
- VIRTUAL_PORT=3000
- LETSENCRYPT_HOST=mycoolwiki.joshfabean.com
ports:
- "3000"
restart: always
version: '2'
services:
nginx-proxy:
container_name: nginx-proxy
image: jwilder/nginx-proxy:alpine
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./letsencrypt/certs:/etc/nginx/certs
- /etc/nginx/vhost.d
- /usr/share/nginx/html
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: letsencrypt
volumes_from:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./letsencrypt/certs:/etc/nginx/certs:rw
wiki:
container_name: wiki
image: ericbarch/dockuwiki
environment:
- SSH_PORT=22
- SSH_DOMAIN=git.joshfabean.com
- REMOTE_URL=git@git.joshfabean.com:fabean/Wiki.git
- VIRTUAL_HOST=mycoolwiki.joshfabean.com
- VIRTUAL_PORT=3000
- LETSENCRYPT_HOST=mycoolwiki.joshfabean.com
ports:
- "3000"
expose:
- "3000"
restart: always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment