Files
ivatar-docker/README.md
Ryan Hamilton ee3e694f4d
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m53s
Add Gitea Actions CI/CD workflow and update README with setup instructions
2025-07-25 08:49:47 -05:00

65 lines
3.1 KiB
Markdown

# ivatar / libravatar as docker image
This is [ivatar](https://www.libravatar.org) as a docker image. The image is freshly built every month from the [ivatar repository at git.linux-kernel.at](https://git.linux-kernel.at/oliver/ivatar).
I couldn't deeply test the image, so please use it with caution.
## How to use this image
```shell
docker run --name ivatar -p 8080:8080 -d registry.gudd-it.de/bastian/ivatar-docker
```
Please be aware that this will not persist any data.
## Environment Variables
| Variable | Description | Default from [config.py](https://git.linux-kernel.at/oliver/ivatar/-/blob/master/config.py)|
| --- | --- | --- |
| `SITE_NAME` | | `libravatar` |
| `SECURE_BASE_URL` | | `https://avatars.linux-kernel.at/avatar/` |
| `BASE_URL` | | `http://avatars.linux-kernel.at/avatar/` |
| `EMAIL_BACKEND` | | - |
| `IVATAR_MAILGUN_API_KEY` | | - |
| `IVATAR_MAILGUN_SENDER_DOMAIN`| | - |
| `SERVER_EMAIL` | | `ivatar@mg.linux-kernel.at` |
| `DEFAULT_FROM_EMAIL` | | `ivatar@mg.linux-kernel.at` |
| `MYSQL_DATABASE` | | - |
| `MYSQL_USER` | | - |
| `MYSQL_PASSWORD` | | - |
| `POSTGRESQL_DATABASE` | | - |
| `POSTGRESQL_USER` | | - |
| `POSTGRESQL_PASSWORD` | | - |
## Gitea Actions CI/CD
This repository includes a Gitea Actions workflow that automatically builds and pushes the Docker image to your Gitea container registry.
### Setup Instructions
1. **Create a Personal Access Token:**
- Go to your Gitea instance: https://gitea.purpleraft.com/
- Navigate to Settings → Applications → Generate New Token
- Create a token with `write:packages` permission
- Copy the token value
2. **Add Repository Secret:**
- Go to your repository settings
- Navigate to Secrets and Variables → Actions
- Add a new secret named `GITEA_TOKEN` with your personal access token as the value
3. **Enable Actions (if not already enabled):**
- Ensure Gitea Actions are enabled in your repository settings
- The workflow will trigger on pushes to main/master branches and pull requests
### Workflow Features
- Builds Docker image using Docker Buildx
- Pushes to `gitea.purpleraft.com/{username}/{repository}`
- Creates multiple tags: branch name, latest (for default branch), and commit SHA
- Uses GitHub Actions cache for faster builds
- Runs on pushes and pull requests
## To Do
- Figure out where the pictures are stored
- Write some setup instructions