Hardening of the Backend docker image (#379)

* Add script to build the backend
* harden the backend docker image
* fix docker-compose
* fix doc
This commit is contained in:
Chevdor
2021-08-26 14:32:11 +02:00
committed by GitHub
parent 238d529eae
commit 19db1a48ef
5 changed files with 48 additions and 7 deletions
+7 -3
View File
@@ -107,6 +107,7 @@ If you'd like to get things runing manually using Docker, you can do the followi
docker run --rm -it --network=telemetry \
--name backend-core \
-p 8000:8000 \
--read-only \
substrate-telemetry-backend \
telemetry_core -l 0.0.0.0:8000
```
@@ -117,6 +118,7 @@ If you'd like to get things runing manually using Docker, you can do the followi
docker run --rm -it --network=telemetry \
--name backend-shard \
-p 8001:8001 \
--read-only \
substrate-telemetry-backend \
telemetry_shard -l 0.0.0.0:8001 -c http://backend-core:8000/shard_submit
```
@@ -127,6 +129,7 @@ If you'd like to get things runing manually using Docker, you can do the followi
docker run --rm -it --network=telemetry \
--name frontend \
-p 3000:8000 \
--read-only \
-e SUBSTRATE_TELEMETRY_URL=ws://localhost:8000/feed \
substrate-telemetry-frontend
```
@@ -160,10 +163,11 @@ You should now see your node showing up in your local [telemetry frontend](http:
![image](doc/screenshot01.png)
### Build & Publish the Frontend docker image
### Build & Publish the Frontend & Backend docker images
The building process is standard. You just need to notice that the Dockerfile is in ./packages/frontend/ and tell docker about it. The context must remain the repository's root though.
The building process is standard. You just need to notice that the `Dockerfile`s are in `./frontend/` and `./backend` and tell docker about it. The context must remain the repository's root though. This is all done for you in the following scripts:
```sh
DOCKER_USER=chevdor ./scripts/build-docker-frontend.sh
DOCKER_USER=$USER ./scripts/build-docker-frontend.sh
DOCKER_USER=$USER ./scripts/build-docker-backend.sh
```