Skip to content

Commit e7102fa

Browse files
committed
Readme update for docker hub, Disable auto port in docker image
1 parent ac1a13b commit e7102fa

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ENV UPLOAD_DIR "/upload"
1212
ENV UPLOAD_TMP_DIR "/upload"
1313

1414
# default environment variables
15-
ENV DISABLE_AUTO_PORT ""
15+
ENV DISABLE_AUTO_PORT "1"
1616
ENV ENABLE_FOLDER_CREATION ""
1717
ENV INDEX_FILE ""
1818
ENV MAX_FILE_SIZE 200

README.md

+10-9
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,26 @@ until the next free port is found. This can be disabled, see below.
3838

3939
*Attention:* Already existing files will be overwritten on upload.
4040

41-
### Docker mode
41+
### Docker
4242

43-
You can just build a container image from this repository.
43+
You can use the docker image [crycode/http-server-upload](https://hub.docker.com/r/crycode/http-server-upload) from the Docker Hub.
44+
45+
Simple usage example:
4446

4547
```sh
46-
docker build -t http-server-upload .
48+
docker run --rm -it -p 8080:8080 crycode/http-server-upload
4749
```
4850

49-
Then run it without argument for default
51+
You may also overwrite default options using environment variables (see below for available variables) and use volumes or bind mounts for upload storage:
5052

5153
```sh
52-
docker run --rm -ti http-server-upload
54+
docker run --rm -it -p 8080:8080 -e TOKEN=foo -e ENABLE_FOLDER_CREATION=1 -v $(pwd):/upload crycode/http-server-upload
5355
```
5456

55-
Or you can override default values with environment variables (see blow for available variables).
56-
`UPLOAD_DIR` and `UPLOAD_TMP_DIR` are set to `/upload`. You may find it useful to mount a volume in this directory to keep uploaded files. Keep in mind that this volume must be writeable by the `node` user. More complete example.
57+
Or you build a container image youself from this repository:
5758

5859
```sh
59-
docker run --rm -ti -e PORT=9090 -e UPLOAD_DIR=/data -v myvolume:/data -p 80:9090 http-server-upload
60+
docker build -t http-server-upload .
6061
```
6162

6263
### Arguments and environment variables
@@ -122,4 +123,4 @@ The `type` is the mime type of the data to upload.
122123
123124
MIT license
124125
125-
Copyright (c) 2019-2023 Peter Müller <[email protected]> <https://crycode.de>
126+
Copyright (c) 2019-2024 Peter Müller <[email protected]> <https://crycode.de>

0 commit comments

Comments
 (0)