- download these two files to the same directory
- docker-compose up
- http://localhost should show you "it works" which is apache being reverse-proxied through nginx
- docker sets up DNS for
web
based on compose service name so the nginx front-end can find http://web - proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd
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
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 |