38 lines
1.1 KiB
Markdown
38 lines
1.1 KiB
Markdown
# 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
|
|
|
|
1. Save the script as `setup_gitea.sh`
|
|
2. Make it executable: `chmod +x setup_gitea.sh`
|
|
3. 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 container
|
|
- `HOST_DATA_PATH`: Path on the host to store Gitea data
|
|
- `WEB_PORT`: Port for web access
|
|
- `SSH_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.
|