Update docker to be better
This commit is contained in:
parent
18c5524ce2
commit
fbda01a5fe
@ -15,7 +15,7 @@ WORKDIR /ew/
|
||||
RUN . "$HOME/.cargo/env" && cargo build --release
|
||||
RUN mkdir /root/ew/ && cp target/release/ew /root/ew/ew
|
||||
|
||||
RUN echo "#!/bin/bash\n\n /root/ew/ew --path \"\${DIRECTORY:-/data/}\" --port \"\${PORT:-8080}\"" > /root/ew/start.sh
|
||||
COPY ./start.sh /root/ew/start.sh
|
||||
|
||||
RUN chmod +x /root/ew/start.sh
|
||||
|
||||
|
@ -7,7 +7,8 @@ services:
|
||||
dockerfile: "./Dockerfile"
|
||||
environment:
|
||||
PORT: 8081
|
||||
DIRECTORY: /data
|
||||
DIRECTORY: /data/
|
||||
HTTPS: false
|
||||
ports:
|
||||
- 8081:8081
|
||||
volumes:
|
||||
|
10
docker/start.sh
Normal file
10
docker/start.sh
Normal file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
port="${PORT:-8080}"
|
||||
directory="${DIRECTORY:-/data/}"
|
||||
|
||||
if [ "$HTTPS" = "true" ]; then
|
||||
/root/ew/ew --path $directory --port $port --https
|
||||
else
|
||||
/root/ew/ew --path $directory --port $port
|
||||
fi
|
Loading…
x
Reference in New Issue
Block a user