Initial commit
This commit is contained in:
7
frontend/Dockerfile
Normal file
7
frontend/Dockerfile
Normal file
@@ -0,0 +1,7 @@
|
||||
FROM nginx:alpine
|
||||
RUN apk add --no-cache openssl
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY index.html /usr/share/nginx/html/index.html
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
5
frontend/entrypoint.sh
Normal file
5
frontend/entrypoint.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
USER="${NETDOC_USER:-admin}"
|
||||
PASS="${NETDOC_PASS:-netdoc}"
|
||||
printf "%s:%s\n" "$USER" "$(openssl passwd -apr1 "$PASS")" > /etc/nginx/.htpasswd
|
||||
exec nginx -g "daemon off;"
|
||||
1759
frontend/index.html
Normal file
1759
frontend/index.html
Normal file
File diff suppressed because it is too large
Load Diff
20
frontend/nginx.conf
Normal file
20
frontend/nginx.conf
Normal file
@@ -0,0 +1,20 @@
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
resolver 127.0.0.11 valid=30s;
|
||||
|
||||
auth_basic "NetDoc Pro";
|
||||
auth_basic_user_file /etc/nginx/.htpasswd;
|
||||
|
||||
location /api/ {
|
||||
set $upstream http://api:8000;
|
||||
proxy_pass $upstream;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
}
|
||||
|
||||
location / {
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user