fix(fileserver): nginx conf
This commit is contained in:
parent
ece527c30b
commit
e1793f9c6f
@ -1,4 +1,4 @@
|
||||
BASE_URL=ftp.
|
||||
BASE_URL=files.
|
||||
EMAIL=
|
||||
|
||||
FILES=./files/
|
||||
|
3
fileserver/Dockerfile
Normal file
3
fileserver/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
||||
FROM docker.io/nginx:latest
|
||||
COPY default.conf /etc/nginx/conf.d/
|
||||
COPY entrypoint.sh /docker-entrypoint.d/99-entrypoint.sh
|
@ -13,10 +13,10 @@ services:
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
fileserver:
|
||||
image: docker.io/nginx:latest
|
||||
build: .
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- "$FILES:/usr/share/nginx/html:ro"
|
||||
- "$FILES:/files/:ro"
|
||||
networks:
|
||||
- nginx
|
||||
|
||||
|
11
fileserver/default.conf
Normal file
11
fileserver/default.conf
Normal file
@ -0,0 +1,11 @@
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
autoindex on;
|
||||
autoindex_exact_size off;
|
||||
autoindex_localtime on;
|
||||
|
||||
location / {
|
||||
root /files;
|
||||
}
|
||||
}
|
9
fileserver/entrypoint.sh
Executable file
9
fileserver/entrypoint.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/bash -e
|
||||
|
||||
if [ -n "$PGID" ]; then
|
||||
groupmod -g "$PGID" nginx
|
||||
fi
|
||||
|
||||
if [ -n "$PUID" ]; then
|
||||
usermod -u "$PUID" nginx
|
||||
fi
|
Loading…
Reference in New Issue
Block a user