Skip to content

Instantly share code, notes, and snippets.

@luisgagocasas
Last active March 1, 2020 19:16
Show Gist options
  • Save luisgagocasas/b1a5bd2225c83e63260364fe6399e84c to your computer and use it in GitHub Desktop.
Save luisgagocasas/b1a5bd2225c83e63260364fe6399e84c to your computer and use it in GitHub Desktop.
docker nginx proxy: multi sites
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
restart: always
ports:
- "80:80"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
v1:
image: nginx
restart: always
expose:
- "80"
volumes:
- ./v1:/usr/share/nginx/html:ro
environment:
- VIRTUAL_HOST=arcux.local
v2:
image: nginx
restart: always
expose:
- "80"
volumes:
- ./v2:/usr/share/nginx/html:ro
environment:
- VIRTUAL_HOST=v1.arcux.local
v3:
image: nginx
restart: always
expose:
- "80"
volumes:
- ./v3:/usr/share/nginx/html:ro
environment:
- VIRTUAL_HOST=v2.arcux.local
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment