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:
14
docker/nginx/Dockerfile
Normal file
14
docker/nginx/Dockerfile
Normal 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
21
docker/nginx/nginx.conf
Normal 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/;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user