Skip to content

Instantly share code, notes, and snippets.

View pankajred's full-sized avatar
🏠
Working from home

pankaj bhagwani pankajred

🏠
Working from home
View GitHub Profile
@pankajred
pankajred / Dockerfile
Created September 13, 2017 08:34 — forked from BretFisher/Dockerfile
WIP sample Laravel php_fpm plus nginx plus supervisor Docker setup with npm, composer, bower, and more
FROM yourdockername/base-php-nginx:latest AS build
# BUILD STAGE
# the primary reason we have two build stages is so SSH key of private repo's will never
# be in final image
# COPY IN BUILD SSH KEY
# It won't be copied to final image
# add this build arg to compose file
ARG BUILDKEY
RUN if [ -z "$BUILDKEY" ]; then echo "BUILDKEY SSH NOT SET - ERROR"; exit 1; else : ; fi
@pankajred
pankajred / README.md
Created September 13, 2017 06:29 — forked from BretFisher/README.md
Simple Apache + Nginx Reverse Proxy Example in Docker Compose
  1. download these two files to the same directory
  2. docker-compose up
  3. http://localhost should show you "it works" which is apache being reverse-proxied through nginx
  4. docker sets up DNS for web based on compose service name so the nginx front-end can find http://web
  5. proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd