Getting started
Multiple ways exists to start STOPnik.
It can be started within a container and from a downloaded or built binary.
Starting within a container is the recommended way so far.
Get STOPnik
Container
Using STOPnik within a container is more recommended way to start STOPnik.
STOPnik is build as Linux container for linux/amd64 and linux/arm64 platforms.
Currently, the container images are hosted at the GitHub container registry.
By default STOPnik containers will expose port 8080 and 8081
- Docker
- Podman
Pull the image
docker pull ghcr.io/webishdev/stopnik:latest
Pull the image
podman pull ghcr.io/webishdev/stopnik:latest
Download
To get the current version of STOPnik head over to GitHub Releases and download the most recent release for your operating system and system architecture.
The current build creates executables for Linux, MacOS and Windows. The executables can be used on ARM and AMD/Intel 64-bit system architectures.
The MacOS version is not notarized or signed right now, so probably an error will be shown on MacOS.
To get rid of this error, it is necessary to remove the quarantine attribute after download.
xattr -rc stopnik*
Starting for the first time
After download or pull of the container image, STOPnik can be started.
When starting STOPnik for the first time, it will complain about the missing configuration.
- Shell
- Docker
- Podman
Starting from Shell
> stopnik
STOPnik development - none
open config.yml: no such file or directory
Starting with Docker
> docker run --rm ghcr.io/webishdev/stopnik:latest
STOPnik development - none
open config.yml: no such file or directory
Starting with Podman
> podman run --rm ghcr.io/webishdev/stopnik:latest
STOPnik development - none
open config.yml: no such file or directory
To continue a configuration must be provided.
For the binary variant just put a config.yml into the same directory as the binary.
For the container variant the config.yml should be mounted into the container. It may be also necessary to mount the necessery TLS certificates and private keys used for signing tokens.
The following command line show how to start the container when the Git repository was cloned and the provided config.yml and the test certificates (inside .test_files folder) are used.
- Docker
- Podman
Starting with Docker
> docker run --rm -p 8080:8080 -p 8081:8081 -v ${PWD}/config.yml:/config.yml -v ${PWD}/.test_files:/.test_files ghcr.io/webishdev/stopnik:latest
time=2024-08-23T10:30:15.774Z level=INFO msg="Config loaded from config.yml"
time=2024-08-23T10:30:15.780Z level=INFO msg="Will accept TLS connections at [::]:8081"
time=2024-08-23T10:30:15.780Z level=ERROR msg="Error starting server: open server.crt: no such file or directory"
time=2024-08-23T10:30:15.780Z level=INFO msg="Will accept connections at [::]:8080"
Starting with Podman
> podman run --rm -p 8080:8080 -p 8081:8081 -v ${PWD}/config.yml:/config.yml -v ${PWD}/.test_files:/.test_files ghcr.io/webishdev/stopnik:latest
time=2024-08-23T10:30:15.774Z level=INFO msg="Config loaded from config.yml"
time=2024-08-23T10:30:15.780Z level=INFO msg="Will accept TLS connections at [::]:8081"
time=2024-08-23T10:30:15.780Z level=ERROR msg="Error starting server: open server.crt: no such file or directory"
time=2024-08-23T10:30:15.780Z level=INFO msg="Will accept connections at [::]:8080"