Giter Site home page Giter Site logo

gitea-docker's Introduction

Gitea in Docker (compose)

1. Clone this repo

git clone [email protected]:rboonzaijer/gitea-docker.git

cd gitea-docker

2. Setup

Make each '{file}.sh' file executable

chmod +x *.sh

3. First run

docker compose up -d

Navigate to: http://localhost:3000

  • SSH Server Port: 222
  • Check: Enable Update Checker
  • Server and Third-Party Service Settings > Enable Local Mode (+ Disable Gravater)
  • Server and Third-Party Service Settings > Disable Self-Registration
  • Server and Third-Party Service Settings > Require Sign-In to View Pages
  • Administrator Account Settings > (create account)

Click: Install Gitea

http://localhost:3000/user/settings/appearance

  • Language: English

( now upload your SSH keys and try out a git clone with http and SSL )

4. Backup/Restore

Backup

This will shut down the container, create backups from the volumes, and then run the container again:

./volumes_backup.sh
# or
./volumes_backup.sh ./../my_backup_dir/

Restore

This will shut down the container, restore (overwrite!) the backup files into the volumes, and start the container again.

./volumes_restore.sh
# or
./volumes_restore.sh ./../my_backup_dir/

Auto-Backup Example

Create a 'backup_gitea.sh' file in your home directory, with this content:

cd /home/roel/gitea-docker && ./volumes_backup.sh /mnt/nas_gitea/

Make it executable:

chmod +x backup_gitea.sh

Run backup script every day at 05:00 AM

sudo crontab -e

0 5 * * * /home/roel/gitea-docker/backup_gitea.sh

Run it directly with:

./backup_gitea.sh

5. Update gitea version

First, set the new version number in 'docker-compose.yml'. Check the latest version number here: https://dl.gitea.com/gitea/version.json

Then run:

docker compose pull && docker compose up -d --remove-orphans

You might want to remove old images, show all images with docker images

To remove an old unused image:

docker rmi gitea/gitea:1.19.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.