Docker Deployment
Instead of building everything by hand like described in the getting started guide you can also use docker.
Locally
There are two Dockerfiles, one in the root of the directory and one in the frontend directory. Those will build two independant docker images you can run like this:
docker build . -t dascr-board-backend
docker build ./frontend -t dascr-board-frontend
Running it
When running you need to be sure to let them run in the same network and to expose the corresponding ports (5000 - frontend, 8000 - backend) to be able to use the container.
Docker-Compose
As there is a docker-compose-local.yml
in the root folder you can do all of this by just issuing:
docker network create dascr
docker-compose -f docker-compose-local.yml up
WARNING
This will run the scoreboard in a way where it will only be functional when browsed to from the host you are running it on.Different IP Address than localhost
By default the procedure above will build the docker image in a way where the scoreboard will only work on the system it was built on. If you need to separate the “viewing client” from the client running the scoreboard, you will need to use the Makefile to build and first run the docker image.
Step 1 will be to create a file called .env
in the folder frontend
as described at Installation#Frontend and fill in the corresponding ip address of the host running the scoreboard. Then you issue make run-docker
for the customization to be applied at build time.
It should run the Scoreboard on port 8080
on that ip you chose and also it should be reachable and functional from within your network.
For the second startup docker-compose -f docker-compose-local.yml up
should be enough.
Docker Release Image
If you do not want to build the docker images yourself this repository also has the latest version as an Release Package. I provide the file docker-compose-repo.yml
for easy running as well.
docker network create dascr
docker-compose -f docker-compose-repo.yml up
After a successful startup you can access the web ui at port 8080
.
WARNING
This build will only work for running and viewing the Scoreboard from one and the same host. If you need to access the scoreboard from another host in the network, you will need to run the procedure described above.What’s next?
When running the container successfully you can continue with webserver setup.
- Caddy2: You might wanna continue setting up caddy2 server to serve the frontend UI