Quick setup script for an gitea in a nested container utilizing incus and docker-compose.
https://about.gitea.com/
util | ||
LICENSE | ||
README.md | ||
setup.sh |
Gitea Setup with Incus and Docker
This script automates the setup of Gitea using Incus containers with nested Docker Compose.
Prerequisites
- Incus installed on the host machine
- Root or sudo access (Incus group perm works too)
Usage
- Save the script as
setup_gitea.sh
- Make it executable:
chmod +x setup_gitea.sh
- Run the script:
sudo ./setup_gitea.sh
The script will:
- Create an Incus container named 'gitea'
- Install Docker and Docker Compose in the container
- Set up Gitea using Docker Compose
- Configure port forwarding for web and SSH access
Access Gitea at http://host-ip:3000
. SSH access is available on port 2222.
Configuration
You can modify the following variables in the script:
CONTAINER_NAME
: Name of the Incus containerHOST_DATA_PATH
: Path on the host to store Gitea dataWEB_PORT
: Port for web accessSSH_PORT
: Port for SSH access
Notes
- The script uses Ubuntu 22.04 as the base image for the Incus container.
- PostgreSQL is used as the database and runs in a separate container.
- Data is persisted on the host machine.
- For production use, review and adjust security settings as needed.