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:
parent
f6a3820961
commit
745edea875
|
@ -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 .
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue