Generating secret for auth tokens:
openssl rand -hex 32- Remember to start docker:
sudo systemctl start docker- build the docker image
make- run the image
docker run --publish 8080:8080 --volume ./data:/myapp/data go-apiThe default address is 0.0.0.0, not localhost because docker.
When I, inevitably, would want to stop docker container and run the app straight:
docker container stop go-apiWill stop the server
docker system prune -a --volumesWill delete all build artifacts from disk.
And, just in case, list containers:
docker container list --allsh into a built image to inspect it
docker run -it --entrypoint sh go-api- Update locally installed go version
- Update dependencies in go.mod
- Update alpine/go versions in Dockerfile
- Update vendored htmx version