Runs a minimal Gitea Docker deployment built on Debian 12.
- Built on Debian 12 for portability
- Uses a non-root user for security
- Only runs
git
andgitea
in the container - Simple
Dockerfile
anddocker-compose.yml
files - One step deployment that creates a valid server on localhost
You should replace the Gitea config file with your own.
See the official Gitea config-cheat-sheet for more information on how to configure these settings.
Building the container and deploying the service is simple.
docker build --target env-build . --tag gitea-docker-build
docker build --target env-deploy . --tag gitea-docker
docker swarm init || true # this only needs to be run once
docker stack deploy -c docker-compose.yml gitea-docker
There is also a Makefile
with shortcuts to these commands to build
and deploy the server more easily.