Quick setup script for an gitea in a nested container utilizing incus and docker-compose. https://about.gitea.com/
Go to file
imnotacoder-eeeee d3c6974743 fixing readme
2024-08-01 00:55:10 -04:00
util Initial Commit. Simple test turned into possible usable setup with some tweaks 2024-07-12 15:43:00 -04:00
gitea.sh nested docker container inside of incus 2024-07-31 23:07:33 -04:00
LICENSE Initial commit 2024-07-12 15:39:18 -04:00
README.md fixing readme 2024-08-01 00:55:10 -04:00

Gitea Incus Deployment Script

This script automates the deployment of Gitea using Incus containers. It provides a simple command-line interface to create a profile, install Gitea and PostgreSQL, and secure the configuration.

Table of Contents

Prerequisites

  • Incus installed and configured on your system
  • Sudo or root access

Usage

Make the script executable:

chmod +x gitea.sh

Create Profile

Create an Incus profile for Gitea:

./gitea.sh profile [-c cpu] [-r ram]

Options:

  • -c cpu: Specify the number of CPUs (optional)
  • -r ram: Specify the amount of RAM in GB (optional)

If CPU or RAM is not specified, the default Incus values will be used.

Install Gitea

Install Gitea and PostgreSQL:

./gitea.sh install [-p dbpassword]

Options:

  • -p dbpassword: Specify a custom database password (optional)

If no password is provided, a default password will be used.

Secure Configuration

After completing the web installation, secure the Gitea configuration:

./gitea.sh secure

Script Behavior

  1. The script enforces the correct order of operations:
    • Profile must be created before installation
    • Gitea must be installed before securing the configuration
  2. The script will create a network named "incusbr0" if it doesn't exist
  3. The root disk size for the Incus container is set to 20GB by default
  4. Gitea will be accessible on port 3000, and SSH access will be on port 2222

Notes

  • After installation, access Gitea through the web interface to complete the setup
  • The script provides the URL to access Gitea after installation
  • Make sure to secure the configuration after completing the web setup

Customization

You can modify the following variables at the top of the script to customize your deployment:

  • CONTAINER_NAME: Name of the Incus container
  • WEB_PORT: Port for accessing Gitea web interface
  • SSH_PORT: Port for SSH access
  • PROFILE_NAME: Name of the Incus profile
  • ROOT_DISK_SIZE: Size of the root disk for the container
  • NETWORK_NAME: Name of the Incus network
  • DB_USER: PostgreSQL database user for Gitea
  • DB_PASS: Default PostgreSQL database password (can be overridden during installation)

Troubleshooting

If you encounter any issues:

  1. Check the Incus container status: incus list
  2. View the container logs: incus exec gitea -- journalctl -u gitea
  3. Ensure all required ports are open and not in use by other services