2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-30 16:41:35 +00:00

Adds nxinx service

This commit is contained in:
Oliver Walters
2021-04-10 22:25:07 +10:00
parent 91b6f98f95
commit 5d9e273559
4 changed files with 61 additions and 3 deletions

14
docker/nginx/Dockerfile Normal file
View File

@@ -0,0 +1,14 @@
FROM nginx:1.19.0-alpine
# Create user account
RUN addgroup -S inventreegroup && adduser -S inventree -G inventreegroup
ENV HOME=/home/inventree
WORKDIR $HOME
# Create the "static" volume directory
RUN mkdir $HOME/static
RUN rm /etc/nginx/conf.d/default.conf
COPY nginx.conf /etc/nginx/conf.d

21
docker/nginx/nginx.conf Normal file
View File

@@ -0,0 +1,21 @@
upstream inventree {
server inventree:8080;
}
server {
listen 80;
location / {
proxy_pass http://inventree;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_redirect off;
client_max_body_size 100M;
}
location /static/ {
alias /home/inventree/static/;
}
}