Dockerfile: removed HTTPS enforcement, updated PORT setting
Dockerfile no longer enforces an HTTPS connection, but still allows for setting via a build arg. The Flask server port is now configurable as a build arg as well, by setting a port number to "whoogle_port"
This commit is contained in:
parent
8a244e15d7
commit
6be53f69ba
|
@ -10,11 +10,14 @@ RUN mkdir $config_dir
|
|||
VOLUME $config_dir
|
||||
ENV CONFIG_VOLUME=$config_dir
|
||||
|
||||
ARG use_https=1
|
||||
ARG use_https=''
|
||||
ENV HTTPS_ONLY=$use_https
|
||||
|
||||
ARG whoogle_port=5000
|
||||
ENV EXPOSE_PORT=${EXPOSE_PORT:-$whoogle_port}
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 5000
|
||||
EXPOSE $EXPOSE_PORT
|
||||
|
||||
CMD ["./whoogle-search"]
|
||||
|
|
|
@ -97,10 +97,6 @@ pip install -r requirements.txt
|
|||
```
|
||||
|
||||
### E) Manual (Docker)
|
||||
___
|
||||
*Note: Docker containers run by default with https enforcement. If your instance will be run over http, you'll need to add `--build-arg use_https=0` to your run command.*
|
||||
___
|
||||
|
||||
1. Ensure the Docker daemon is running, and is accessible by your user account
|
||||
- To add user permissions, you can execute `sudo usermod -aG docker yourusername`
|
||||
- Running `docker ps` should return something besides an error. If you encounter an error saying the daemon isn't running, try `sudo systemctl start docker` (Linux) or ensure the docker tool is running (Windows/macOS).
|
||||
|
|
|
@ -7,7 +7,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd -P)"
|
|||
|
||||
# Set default port if unavailable
|
||||
if [[ -z "${PORT}" ]]; then
|
||||
PORT=5000
|
||||
PORT="${EXPOSE_PORT:-5000}"
|
||||
fi
|
||||
|
||||
# Set directory to serve static content from
|
||||
|
@ -21,5 +21,5 @@ mkdir -p $STATIC_FOLDER
|
|||
if [[ $SUBDIR == "test" ]]; then
|
||||
pytest -sv
|
||||
else
|
||||
python3 -um app --host 0.0.0.0 --port $PORT --debug
|
||||
python3 -um app --host 0.0.0.0 --port $PORT
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue
Block a user