forgejo-conf-files/README.md

72 lines
3.2 KiB
Markdown
Raw Normal View History

# Awiteb's forgejo personal instance
This is my personal instance of forgejo. the place where I hack.
## What is forgejo?
See https://forgejo.org
## What is this configurations aims to do?
Is just a personal instance, means that you are only one have rights to do anything.
Others are only contributors means that they can only fork your repository and make pull requests and create issues,
they can't create repositories.
## Imortant notes
2024-03-03 23:15:08 +01:00
After you create your account, you need to change your account visibility to public, by going to your profile and then click on the settings and then change the visibility to public, then change the [app.ini](./forgejo/forgejo/conf/app.ini) and remove the `public` visibility from the `ALLOWED_USER_VISIBILITY_MODES`. This will make you the only visible user in the instance.
## Secrets
2024-03-03 23:15:08 +01:00
Forgejo will add the secrets to the [app.ini](./forgejo/forgejo/conf/app.ini) file, so make sure to not remove the [app.ini](./forgejo/forgejo/conf/app.ini) file from the repository, and do not share it with anyone.
## How to use this configuration?
2024-03-03 23:15:08 +01:00
Just clone this repository, then read the [app.ini](./forgejo/forgejo/conf/app.ini) file and changes the values to your needs, then run the following command:
```bash
sed -i -e "s/{SHARED_SECRET}/$(openssl rand -hex 20)/" docker-compose.yml
docker-compose up -d
```
The instance will be available at `http://0.0.0.0:8080` so proxy it to your domain.
## Upgrading
2024-03-20 22:33:30 +01:00
### Patch
Stop the instance using `docker-compose rm -s -f` then remove the forgejo image using `docker rmi -f <IMAGE ID>` then rerun the instace using `docker-compose up -d`
2024-04-24 00:21:51 +02:00
> [!TIP]
2024-03-20 22:33:30 +01:00
> You can use `just update_patch`
### Major,Mirror
Change the version in the [docker-compose.yml](./docker-compose.yml) file and then remove the containers
by running `docker-compose rm -s -f` and then run `docker-compose up -d` again.
## Restaring
When you want to restart the forgejo, do not run `docker-compose restart` I see that makes some changes to the configuration, so it's better to remove the containers by running `docker-compose rm -s -f` and then run `docker-compose up -d` again.
2024-04-24 00:21:51 +02:00
> [!TIP]
2024-03-20 22:33:30 +01:00
>
> You can use `just restart`
## Database
Is using sqlite3, and is more than enough for personal use.
## Backup
2024-03-03 23:15:08 +01:00
The data is stored in the [forgejo](./forgejo) directory and [forgejo-runner](./forgejo-runner) directory, so you can backup them.
The containers are stateless, so it's do not store any data.
2024-04-24 00:21:51 +02:00
> [!TIP]
2024-03-20 22:33:30 +01:00
>
> You can use `just backup <BACKUP NAME>`
## Justfile
Justfile will help you to work with the instance, you need to install [just](https://github.com/casey/just) CLI then this task will be available for you
| Name | Description | Example | Aliases |
|---|---|---|---|
| run | Run the instance | `just run` | r |
| stop | Stop the instance | `just stop` | s |
| update\_patch | Update to the latest patch version | `just update_patch` | u |
| restart | Restart the instance | `just restart` | N/A |
| backup | Backup the instance files | `just backup forgejo_backup` | b |
## How to contribute?
Make issue first to discuss the changes, then make pull request (if the issue is accepted)
## License
2024-03-03 23:15:08 +01:00
The configuration is licensed under the MIT License. See [LICENSE](./LICENSE) file for more information.