Created
January 8, 2018 19:41
-
-
Save tylerthebuildor/f998deb298adc06baaebc8868322a6ea to your computer and use it in GitHub Desktop.
Docker Compose Single Host NGINX Proxy
This file contains 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
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