Initial Commit
This commit is contained in:
parent
619f22e885
commit
6c0eaced3f
|
@ -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;"]
|
|
@ -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
|
|
@ -0,0 +1,14 @@
|
|||
user nginx;
|
||||
|
||||
events {
|
||||
worker_connections 1000;
|
||||
}
|
||||
|
||||
http {
|
||||
server {
|
||||
listen 80;
|
||||
location / {
|
||||
proxy_pass http://${APP_NAME}:${APP_PORT};
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue