Skip to content

Instantly share code, notes, and snippets.

@bst27
bst27 / gitea-backup.sh
Created August 18, 2020 07:15
A Gitea backup script for Docker: It creates a .zip backup of Gitea running inside Docker and moves the backup file to the current working directory.
#!/bin/bash
# This script creates a .zip backup of gitea running inside docker and copies the backup file to the current working directory
echo "Creating gitea backup inside docker containter ..."
docker exec -u git -it -w /tmp $(docker ps -qf "name=gitea_server_1") bash -c '/app/gitea/gitea dump -c /data/gitea/conf/app.ini --file /tmp/gitea-dump.zip'
echo "Copying backup file from the container to the host machine ..."
docker cp $(docker ps -qf "name=gitea_server_1"):/tmp/gitea-dump.zip /tmp
@bst27
bst27 / README.md
Created November 19, 2023 12:36
Gitea docker (rootless) without SSH Passthrough

Gitea docker (rootless) without SSH passthrough

Official gitea docs are heavily focussed on doing SSH passthrough from the host machine to the docker container. An alternative is to simply run SSH for Gitea on a different port. Though I had some problems getting this docker compose setup to run. This gist contains my setup I finally came up with: It does not require SSH passthrough from the host to the docker container but still offers support to git clone via SSH.

To check if this setup works for you simply follow these steps:

  1. Place enclosed docker-compose.yml in a directory.
  2. Run docker compose up
  3. Visit http://localhost:8033/ and simply install Gitea with given defaults
@bst27
bst27 / README.md
Created June 15, 2025 17:07
Laravel E-Mail verification fails with: 403 Invalid signature

If you use Laravel (Jetstream) with user email verification enabled and you get this error 403 Invalid signature when you want to confirm an user email address, you should check if you are executing your Laravel application behind a reverse proxy (e.g. Traefik, Caddy). Some cloud services like Heroku, Coolify or AWS ELB do this, too.

In this case you have to configure Laravel to trust the reverse proxy. This will fix the problem: