Initial Commit

This commit is contained in:
Derek Paschal 2023-06-08 16:52:16 -05:00
parent 619f22e885
commit 6c0eaced3f
3 changed files with 38 additions and 0 deletions

9
Dockerfile Normal file
View File

@ -0,0 +1,9 @@
FROM nginx:latest
ENV NGINX_ENVSUBST_OUTPUT_DIR=/etc/nginx
ENV APP_PORT=80
ENV APP_NAME=
COPY ./nginx.conf /etc/nginx/templates/nginx.conf.template
CMD ["nginx", "-g", "daemon off;"]

15
compose.yaml Normal file
View File

@ -0,0 +1,15 @@
version: '3.4'
services:
lb:
build: .
environment:
- APP_PORT=2001
- APP_NAME=whoami
ports:
- "8081:80"
whoami:
image: traefik/whoami
command:
# It tells whoami to start listening on 2001 instead of 80
- --port=2001

14
nginx.conf Normal file
View File

@ -0,0 +1,14 @@
user nginx;
events {
worker_connections 1000;
}
http {
server {
listen 80;
location / {
proxy_pass http://${APP_NAME}:${APP_PORT};
}
}
}