Skip to content

Runs a minimal Gitea Docker deployment built on Debian 12

License

Notifications You must be signed in to change notification settings

fboulnois/gitea-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gitea on Docker

Runs a minimal Gitea Docker deployment built on Debian 12.

Features

  • Built on Debian 12 for portability
  • Uses a non-root user for security
  • Only runs git and gitea in the container
  • Simple Dockerfile and docker-compose.yml files
  • One step deployment that creates a valid server on localhost

Configuration

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.

Build and Deploy

Building the container and deploying the service is simple.

Build

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

Deploy

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.