Skip to content

Instantly share code, notes, and snippets.

@tylerbuchea
Created January 8, 2018 19:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tylerbuchea/f998deb298adc06baaebc8868322a6ea to your computer and use it in GitHub Desktop.
Save tylerbuchea/f998deb298adc06baaebc8868322a6ea to your computer and use it in GitHub Desktop.
Docker Compose Single Host NGINX Proxy
version: "3.2"
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "3000:80" # change to "80:80" for production
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
site:
build: ../site
volumes:
- ../site/src:/opt/app/src # Remove volumes for production
command: yarn start-dev # Change to pm2-docker bin/www or some equivelant for production
ports:
- "3001"
environment:
NODE_ENV: development # change to production for production
VIRTUAL_HOST: localhost
VIRTUAL_PORT: 3001
PORT: 3001
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment