Clarify config necessary for exposing container port

If Rocket is not configured to listen on 0.0.0.0:8000, exposing port
8000 on the inside to a chosen port (2399 by default), will not work.
This commit is contained in:
Paul van Tilburg 2023-01-13 11:57:19 +01:00
parent f6a3820961
commit 745edea875
Signed by: paul
GPG Key ID: C6DE073EDA9EEC4D
2 changed files with 8 additions and 4 deletions

View File

@ -43,7 +43,7 @@ port = 2399
This will work independent of the type of build. For more about Rocket's
configuration, see: <https://rocket.rs/v0.5-rc/guide/configuration/>.
### Using cargo
### Using Cargo
Using Cargo it is easy to build and run Solar Grabber. just run:
@ -57,7 +57,7 @@ $ cargo run --release
### Using Docker (Compose)
Using `docker-compose` it is easy (to build and) run using a Docker image.
Using Docker Compose it is easy (to build and) run using a Docker image.
If you do not change `docker-compose.yml` it will use `Rocket.toml` from
the current working directory as configuration:
@ -66,7 +66,10 @@ $ docker-compose up
...
```
To use Docker directly, run to build an image and the run it:
Ensure that `Rocket.toml` listens on address `0.0.0.0` port `8000` for the
exposing of the container port to the outside to work!
Alternatively, to use Docker directly, run to build an image and the run it:
```console
$ docker build --rm --tag solar-grabber:latest .

View File

@ -6,9 +6,10 @@ services:
build: .
restart: unless-stopped
ports:
# Ensure that Rocket listens on 0.0.0.0, port 8000 for this!
- 2399:8000
# Use a `Rocket.toml` or configure the credentials using environment variables below
volumes:
# Use a `Rocket.toml` or configure the credentials using environment variables below
- ./Rocket.toml:/app/Rocket.toml
environment:
ROCKET_LOG_LEVEL: normal # Available levels are: off, debug, normal, critical