Compare commits
2 Commits
63eaceb6e6
...
700190c6e6
Author | SHA1 | Date | |
---|---|---|---|
700190c6e6 | |||
b177423755 |
@ -1,43 +0,0 @@
|
|||||||
name: Bump Dependencies
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *"
|
|
||||||
- cron: "0 12 * * *"
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-dependencies:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout Repo
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Setup Bun
|
|
||||||
uses: oven-sh/setup-bun@v2
|
|
||||||
|
|
||||||
- name: Install Dependencies
|
|
||||||
run: bun install
|
|
||||||
|
|
||||||
- name: Update Dependencies
|
|
||||||
run: bun update
|
|
||||||
|
|
||||||
- name: Build App
|
|
||||||
run: bun run build
|
|
||||||
|
|
||||||
- name: Commit and Push Changes
|
|
||||||
env:
|
|
||||||
USERNAME_GITEA: ${{ secrets.USERNAME_GITEA }}
|
|
||||||
TOKEN_GITEA: ${{ secrets.TOKEN_GITEA }}
|
|
||||||
run: |
|
|
||||||
git config --global user.name "LibreCloud Actions Bot"
|
|
||||||
git config --global user.email "git@pontusmail.org"
|
|
||||||
git remote set-url origin https://${USERNAME_GITEA}:${TOKEN_GITEA}@git.pontusmail.org/librecloud/web.git
|
|
||||||
git add .
|
|
||||||
git commit -m "chore: bump dependencies" || exit 0
|
|
||||||
git push origin main
|
|
42
.github/workflows/bump.yml
vendored
Normal file
42
.github/workflows/bump.yml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: Bump Dependencies
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
- cron: "0 12 * * *"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
update-dependencies:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repo
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Bun
|
||||||
|
uses: oven-sh/setup-bun@v2
|
||||||
|
|
||||||
|
- name: Install Dependencies
|
||||||
|
run: bun install
|
||||||
|
|
||||||
|
- name: Update Dependencies
|
||||||
|
run: bun update
|
||||||
|
|
||||||
|
- name: Commit and Push Changes
|
||||||
|
env:
|
||||||
|
USERNAME_GITEA: ${{ secrets.USERNAME_GITEA }}
|
||||||
|
TOKEN_GITEA: ${{ secrets.TOKEN_GITEA }}
|
||||||
|
SERVER_URL: ${{ secrets.SERVER_URL }}
|
||||||
|
run: |
|
||||||
|
git config --global user.name "LibreCloud Actions Bot"
|
||||||
|
git config --global user.email "git@pontusmail.org"
|
||||||
|
echo "Connecting to $SERVER_URL"
|
||||||
|
git remote set-url origin https://${USERNAME_GITEA}:${TOKEN_GITEA}@git.pontusmail.org/librecloud/web.git
|
||||||
|
git add .
|
||||||
|
git commit -m "chore: bump dependencies" || exit 0
|
||||||
|
git push origin main
|
@ -14,14 +14,14 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Log in to Gitea Package Registry
|
- name: Log in to Gitea Package Registry
|
||||||
run: echo "${{ secrets.PACKAGE_TOKEN }}" | docker login $SERVER_URL -u $USERNAME --password-stdin
|
uses: docker/login-action@v3
|
||||||
env:
|
with:
|
||||||
SERVER_URL: ${{ secrets.SERVER_URL }}
|
registry: ${{ secrets.SERVER_URL }}
|
||||||
USERNAME: ${{ secrets.USERNAME }}
|
username: ${{ secrets.USERNAME }}
|
||||||
PACKAGE_TOKEN: ${{ secrets.PACKAGE_TOKEN }}
|
password: ${{ secrets.PACKAGE_TOKEN }}
|
||||||
|
|
||||||
- name: Build Docker Image
|
- name: Build Docker Image
|
||||||
run: docker build -t git.pontusmail.org/librecloud/web:latest .
|
run: docker build -t git.pontusmail.org/librecloud/web:latest .
|
34
README.md
34
README.md
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||

|

|
||||||
[](http://creativecommons.org/publicdomain/zero/1.0/)
|
[](http://creativecommons.org/publicdomain/zero/1.0/)
|
||||||
[](https://git.pontusmail.org/librecloud/web/actions/?workflow=docker.yaml)
|
[](https://github.com/ihatenodejs/librecloud-web/actions/workflows/docker.yml)
|
||||||
[](https://git.pontusmail.org/librecloud/web/actions/?workflow=ci.yaml)
|
[](https://github.com/ihatenodejs/librecloud-web/actions/workflows/bump.yml)
|
||||||
[](https://git.pontusmail.org/librecloud/web/actions/?workflow=bump.yml)
|
|
||||||
|
|
||||||
LibreCloud's website, dashboard, and API
|
LibreCloud's website, dashboard, and API
|
||||||
|
|
||||||
@ -40,7 +39,7 @@ A Docker setup requires both Docker *and* Docker Compose.
|
|||||||
|
|
||||||
3. **Generate auth secret**
|
3. **Generate auth secret**
|
||||||
|
|
||||||
This step is relatively painless. Simply execute the below command to generate a `.env.local` file with an `AUTH_SECRET`.
|
This step is relatively painless. Execute the below command to generate a `.env.local` file with an `AUTH_SECRET`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bunx auth secret
|
bunx auth secret
|
||||||
@ -52,7 +51,9 @@ A Docker setup requires both Docker *and* Docker Compose.
|
|||||||
|
|
||||||
5. **Initialize Prisma (optional)**
|
5. **Initialize Prisma (optional)**
|
||||||
|
|
||||||
Because `web` uses a database for storing Git link statuses (and other things to come), you will need to initialize the SQLite database. However, if you are using Docker Compose, a database has already been generated in the container image, and is blank.
|
Because `web` uses a database for storing Git link statuses (and other things to come),
|
||||||
|
you will need to initialize the SQLite database.
|
||||||
|
However, if you are using Docker Compose, a database has already been generated in the container image and is blank.
|
||||||
|
|
||||||
If you have a reason to initialize Prisma now, feel free to execute:
|
If you have a reason to initialize Prisma now, feel free to execute:
|
||||||
|
|
||||||
@ -71,7 +72,8 @@ A Docker setup requires both Docker *and* Docker Compose.
|
|||||||
|
|
||||||
7. **Complete Setup**
|
7. **Complete Setup**
|
||||||
|
|
||||||
If you would like to host the entire LibreCloud frontend and backend, you will also need to setup the following repositories and edit this project to work with *your* setup.
|
If you would like to host the entire LibreCloud frontend and backend,
|
||||||
|
you will also need to set up the following repositories and edit this project to work with *your* setup.
|
||||||
|
|
||||||
* [mail-connect](https://git.pontusmail.org/librecloud/mail-connect)
|
* [mail-connect](https://git.pontusmail.org/librecloud/mail-connect)
|
||||||
* [docker-mailserver](https://github.com/docker-mailserver/docker-mailserver)
|
* [docker-mailserver](https://github.com/docker-mailserver/docker-mailserver)
|
||||||
@ -101,7 +103,7 @@ A Docker setup requires both Docker *and* Docker Compose.
|
|||||||
|
|
||||||
4. **Generate auth secret**
|
4. **Generate auth secret**
|
||||||
|
|
||||||
This step is relatively painless. Simply execute the below command to generate a `.env.local` file with an `AUTH_SECRET`.
|
This step is relatively painless. Execute the below command to generate a `.env.local` file with an `AUTH_SECRET`.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
bunx auth secret
|
bunx auth secret
|
||||||
@ -131,11 +133,14 @@ A Docker setup requires both Docker *and* Docker Compose.
|
|||||||
|
|
||||||
## Environment Variables
|
## Environment Variables
|
||||||
|
|
||||||
At the time of writing, LibreCloud is not in the state of perfection, and as such we are expecting that you have a setup exact to ours. While this will change in the future, we still suggest that provide all of the listed environment variables.
|
At the time of writing, LibreCloud is not in the state of perfection,
|
||||||
|
and as such we are expecting that you have a setup exact to ours.
|
||||||
|
While this will change in the future, we still suggest that provide all the listed environment variables.
|
||||||
|
|
||||||
### Authentik
|
### Authentik
|
||||||
|
|
||||||
We use [Auth.js](https://authjs.dev) to provide authentication for users through Authentik. To do this, you will need to create a new OAuth2 provider in Authentik and put it's configuration in your `.env` file.
|
We use [Auth.js](https://authjs.dev) to provide authentication for users through Authentik.
|
||||||
|
To do this, you will need to create a new OAuth2 provider in Authentik and put its configuration in your `.env` file.
|
||||||
|
|
||||||
If you need more help doing this, there is a fantastic guide [on Authentik's wiki](https://docs.goauthentik.io/docs/add-secure-apps/providers/oauth2/).
|
If you need more help doing this, there is a fantastic guide [on Authentik's wiki](https://docs.goauthentik.io/docs/add-secure-apps/providers/oauth2/).
|
||||||
|
|
||||||
@ -149,7 +154,10 @@ If you need more help doing this, there is a fantastic guide [on Authentik's wik
|
|||||||
|
|
||||||
### Gitea
|
### Gitea
|
||||||
|
|
||||||
Next, you will need to configure `web` with your Gitea instance. Create a new access token in your Gitea user settings (), and input the key you receive, as well as the URL of your instance, and the API URL. You can find a link to the API and it's endpoint URL on the footer.
|
Next, you will need to configure `web` with your Gitea instance.
|
||||||
|
Create a new access token in your Gitea user settings (),
|
||||||
|
and input the key you receive, as well as the URL of your instance, and the API URL.
|
||||||
|
You can find a link to the API and its endpoint URL on the footer.
|
||||||
|
|
||||||
| Environment Variable | Description | Example |
|
| Environment Variable | Description | Example |
|
||||||
|----------------------|-----------------------------------------------|--------------------------------------------|
|
|----------------------|-----------------------------------------------|--------------------------------------------|
|
||||||
@ -163,8 +171,8 @@ mail-connect, another project by LibreCloud, is a bridge from `docker-mailserver
|
|||||||
|
|
||||||
Keep in mind, this endpoint should **NOT** be public, and `web` should be the only authorized user of the API, unless you know what you're doing. There is zero authentication.
|
Keep in mind, this endpoint should **NOT** be public, and `web` should be the only authorized user of the API, unless you know what you're doing. There is zero authentication.
|
||||||
|
|
||||||
| Environment Variable | Description | Example |
|
| Environment Variable | Description | Example |
|
||||||
|----------------------|------------------------------|-----------------------|
|
|----------------------|------------------------------|-------------------------|
|
||||||
| MAIL_CONNECT_API_URL | URL of your mail-connect API | `http://localhost:4200` |
|
| MAIL_CONNECT_API_URL | URL of your mail-connect API | `http://localhost:4200` |
|
||||||
|
|
||||||
### Auth.js
|
### Auth.js
|
||||||
@ -181,4 +189,4 @@ We suggest starting by allowing Auth.js
|
|||||||
|
|
||||||
* [X] Add documentation on .env
|
* [X] Add documentation on .env
|
||||||
* [ ] Implement security scans
|
* [ ] Implement security scans
|
||||||
* [ ] Ratelimiting on API
|
* [ ] Rate-limiting on API
|
||||||
|
Loading…
x
Reference in New Issue
Block a user