This repository provides the necessary files to set up a Gitea instance using Docker Compose and manage it with PostgreSQL as the database on a Debian or Ubuntu server.
docker-compose.yml: Defines the Docker Compose setup for Gitea and PostgreSQL.README.md: Documentation for building and launching the service.gitea.service: Systemd unit file to manage the Docker Compose environment as a service.
git clone git@github.com:SolidRusT/srt-gitea-service.git
cd srt-gitea-servicedocker compose up -ddocker compose psdocker compose downTo manage the Docker Compose environment as a systemd service, copy the provided gitea.service file and enable it:
sudo cp systemd.service /etc/systemd/system/gitea.service
sudo systemctl daemon-reload
sudo systemctl start gitea.service # (only after verifying the filesystem is properly mounted)- The
docker-compose.ymlfile can be modified to adjust settings such as ports, volumes, and environment variables. - You can customize Gitea settings by modifying the environment variables defined in the
serverservice section.
- The Gitea instance will be accessible at
http://<server-ip>:3000. - SSH access is available at port
222for repository cloning and management. - Data for Gitea is stored in the Docker volume
giteaand PostgreSQL data is stored in./postgreson the host system.
- If the service fails to start, check the logs for any errors:
docker-compose logs- Ensure that the Docker Compose environment is properly mounted and configured.
- Verify that the PostgreSQL database is running and accessible.
sudo journalctl -xeu gitea.service