-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* deploy docusaurus docs * add more infos to docs * improve quickstart and requirements page * add authenticatiion docs * split env setup into several categories * add info how to add pacman repo * cleanup readme and add development.md
- Loading branch information
1 parent
3df8bcf
commit 6a0e3a4
Showing
33 changed files
with
9,213 additions
and
139 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
name: Build Docusaurus | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./docs | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
cache-dependency-path: './docs/yarn.lock' | ||
|
||
- name: Install dependencies | ||
run: yarn install --frozen-lockfile | ||
- name: Build website | ||
run: yarn build | ||
|
||
- name: Upload Build Artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: docs/build | ||
|
||
deploy: | ||
name: Deploy to GitHub Pages | ||
needs: build | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Dependencies | ||
/node_modules | ||
|
||
# Production | ||
/build | ||
|
||
# Generated files | ||
.docusaurus | ||
.cache-loader | ||
|
||
# Misc | ||
.DS_Store | ||
.env.local | ||
.env.development.local | ||
.env.test.local | ||
.env.production.local | ||
|
||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# Website | ||
|
||
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator. | ||
|
||
### Installation | ||
|
||
``` | ||
$ yarn | ||
``` | ||
|
||
### Local Development | ||
|
||
``` | ||
$ yarn start | ||
``` | ||
|
||
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server. | ||
|
||
### Build | ||
|
||
``` | ||
$ yarn build | ||
``` | ||
|
||
This command generates static content into the `build` directory and can be served using any static contents hosting service. | ||
|
||
### Deployment | ||
|
||
Using SSH: | ||
|
||
``` | ||
$ USE_SSH=true yarn deploy | ||
``` | ||
|
||
Not using SSH: | ||
|
||
``` | ||
$ GIT_USER=<Your GitHub username> yarn deploy | ||
``` | ||
|
||
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
presets: [require.resolve('@docusaurus/core/lib/babel/preset')], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Configuration", | ||
"position": 3 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Authentication via OAuth2 | ||
|
||
AURCache supports OAuth2 authentication via various Oauth2 providers such as Authentik or Keycloak. | ||
This allows you to restrict access to your AURCache instance to only users who have authenticated with one of these services. | ||
|
||
Setup the following Environment Variables to enable OAuth2 authentication: | ||
|
||
| Variable | Type | Description | Default | | ||
|------------------------|-----------------------|---------------------------------------------------------------------|---------------------------| | ||
| OAUTH_AUTH_URI | String | Oauth authorize endpoint | null | | ||
| OAUTH_TOKEN_URI | String | Oauth token endpoint | null | | ||
| OAUTH_REDIRECT_URI | String | Oauth redirect uri back to AURCache | null | | ||
| OAUTH_CLIENT_ID | String | Oauth client ID | null | | ||
| OAUTH_CLIENT_SECRET | String | Oauth client Secret | null | | ||
|
||
To disable Authentiation leave all `OAUTH_*` variables undefined. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Environment Variables | ||
AURCache can be configured using the following environment variables: | ||
|
||
## Database Configuration | ||
| Variable | Type | Description | Default | | ||
|------------------------|-----------------------|---------------------------------------------------------------------|---------------------------| | ||
| DB_TYPE | (POSTGRESQL\| SQLITE) | Type of Database (SQLite, PostgreSQL) | SQLITE | | ||
| DB_USER | String | POSTGRES Username (ignored if sqlite) | null | | ||
| DB_PWD | String | POSTGRES Password (ignored if sqlite) | null | | ||
| DB_HOST | String | POSTGRES Host (ignored if sqlite) | null | | ||
| DB_NAME | String | Database name | 'db.sqlite' or 'postgres' | | ||
|
||
## General Settings | ||
|
||
| Variable | Type | Description | Default | | ||
|------------------------|-----------------------|---------------------------------------------------------------------|---------------------------| | ||
| VERSION_CHECK_INTERVAL | Integer | Interval in seconds for checking package versions | 3600 | | ||
| BUILD_ARTIFACT_DIR | String | pkg share directory between aurcache container and build containers | null | | ||
| LOG_LEVEL | String | Log level | INFO | | ||
| MAX_CONCURRENT_BUILDS | Integer | Max concurrent builds | 1 | | ||
| CPU_LIMIT | Integer | CPU limit of build container in milli CPUs | 0 | | ||
| MEMORY_LIMIT | Integer | Memory limit of build container in MB | -1 | | ||
| JOB_TIMEOUT | Integer | Job timeout for build in Seconds | 3600 | | ||
| SECRET_KEY | String | \>32Byte Random String for singing cookies | Random | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"label": "Overview", | ||
"position": 1 | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# Development | ||
If you want to contribute to the project feel free to checkout the code and try to fix a bug or implement a feature. | ||
|
||
## Build Info | ||
|
||
The AURCache project comprises two main components: a Flutter frontend and a Rust backend. | ||
### Frontend (Flutter) | ||
|
||
To build the Flutter frontend, ensure you have Flutter SDK installed. Then, execute the following commands: | ||
|
||
```bash | ||
cd frontend | ||
flutter pub get | ||
flutter build web | ||
``` | ||
|
||
### Backend (Rust) | ||
|
||
To build the Rust backend, make sure you have Rust installed. Then, navigate to the backend directory and run: | ||
|
||
```bash | ||
cd backend | ||
cargo build --release | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# Introduction | ||
|
||
AURCache is a build server and repository for Archlinux packages sourced from the AUR (Arch User Repository). It features a Flutter frontend and Rust backend, enabling users to add packages for building and subsequently serves them as a pacman repository. Notably, AURCache automatically detects when a package is out of date and displays it within the frontend. | ||
|
||
|
||
## Advantages | ||
|
||
- **Avoid repeated builds**: Build your packages only once on your server and not on every client. | ||
- **Reduce CPU and memory usage**: Clients only need to download packages. | ||
- **Reduce build time**: Build packages in parallel. | ||
- **Reduce network traffic**: Serve packages from your local network. | ||
- **Automatically update packages**: AURCache automatically checks for updates. | ||
- **Customize your repository**: Add custom packages to your repository. | ||
|
||
## Getting Started | ||
Get started with [Quick Start](/docs/overview/quick-start) to try it out. | ||
|
||
For advanced setup, see the [Configuration](/docs/configuration) page. |
Oops, something went wrong.