Last active
April 20, 2018 13:25
-
-
Save smyth64/13699b98e03b789a4bb3c9de26be812a to your computer and use it in GitHub Desktop.
Fast Docker Letsencrypt Reverse Proxy
This file contains hidden or 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
``` | |
docker network create webproxy && | |
git clone https://github.com/evertramos/docker-compose-letsencrypt-nginx-proxy-companion proxy && | |
cd proxy && | |
cp .env.sample .env && | |
sed -i -e 's/\/path\/to\/your\/nginx\/data/\.\/data/g' .env && | |
docker-compose up -d | |
``` | |
An example of a docker-compose project looks like this: | |
``` | |
version: '3' | |
services: | |
web: | |
image: node | |
command: npm run dev | |
restart: always | |
expose: | |
- '8080' | |
environment: | |
VIRTUAL_HOST: 'www.domain.de,domain.de' | |
VIRTUAL_PORT: 8080 | |
LETSENCRYPT_HOST: 'www.domain.de,domain.de' | |
LETSENCRYPT_EMAIL: '[email protected]' | |
working_dir: /app | |
volumes: | |
- '.:/app' | |
networks: | |
- reverseproxy | |
networks: | |
reverseproxy: | |
external: | |
name: webproxy | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment