Skip to content

Commit

Permalink
Merge branch 'master' into 709-merge-master
Browse files Browse the repository at this point in the history
  • Loading branch information
Bettelstab authored Jul 3, 2024
2 parents d44aa7a + 3002d71 commit 05d4f2c
Show file tree
Hide file tree
Showing 24 changed files with 60 additions and 546 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,29 +44,24 @@ jobs:
name: Build Docker Production - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Build Docker Production
run: docker compose -f docker-compose.yml build
run: docker compose -f docker-compose.yml build admin

docker-development:
if: needs.files-changed.outputs.admin == 'true'
name: Build Docker Development - Admin
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./admin
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Admin | Build Docker Development
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}
run: docker compose build admin admin-documentation admin-storybook

docs:
if: needs.files-changed.outputs.admin-docs == 'true'
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,30 +49,24 @@ jobs:
name: Build Docker Production - Backend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./backend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Backend | Build Docker Production
run: docker compose -f docker-compose.yml build
working-directory: ${{env.WORKING_DIRECTORY}}
run: docker compose -f docker-compose.yml build backend

docker-development:
if: needs.files-changed.outputs.backend == 'true'
name: Build Docker Development - Backend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./backend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Backend | Build Docker Development
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}
run: docker compose build backend backend-documentation

docs:
if: needs.files-changed.outputs.backend-docs == 'true'
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/frontend..yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,24 @@ jobs:
name: Build Docker Production - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Docker Production
run: docker compose -f docker-compose.yml build
working-directory: ${{env.WORKING_DIRECTORY}}
run: docker compose -f docker-compose.yml build frontend

docker-development:
if: needs.files-changed.outputs.frontend == 'true'
name: Build Docker Development - Frontend
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./frontend
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Frontend | Build Docker Development
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}
run: docker compose build frontend frontend-documentation frontend-storybook

docs:
if: needs.files-changed.outputs.frontend-docs == 'true'
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/presenter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,30 +44,24 @@ jobs:
name: Build Docker Production - Presenter
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./presenter
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Presenter | Build Docker Production
run: docker compose -f docker-compose.yml build
working-directory: ${{env.WORKING_DIRECTORY}}
run: docker compose -f docker-compose.yml build presenter

docker-development:
if: needs.files-changed.outputs.presenter == 'true'
name: Build Docker Development - Presenter
needs: files-changed
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./presenter
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Presenter | Build Docker Development
run: docker compose build
working-directory: ${{env.WORKING_DIRECTORY}}
run: docker compose build presenter presenter-documentation presenter-storybook

docs:
if: needs.files-changed.outputs.presenter-docs == 'true'
Expand Down
14 changes: 0 additions & 14 deletions admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,6 @@ This projects utilizes `storybook` and `chromatic` to develop, document & test f
| **Maintenance** | |
| `npm run update` | Check for updates |

### Docker

### Docker development mode

```bash
docker compose up
```

### Docker can be run in production mode

```bash
docker compose -f docker-compose.yml up
```

### Chromatic

In order to use the chromatic workflow you need to provide a `CHROMATIC_PROJECT_TOKEN` in the repository secrets.
Expand Down
63 changes: 0 additions & 63 deletions admin/docker-compose.override.yml

This file was deleted.

28 changes: 0 additions & 28 deletions admin/docker-compose.yml

This file was deleted.

23 changes: 23 additions & 0 deletions authentik/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,26 @@ If you want to publish changes to the database you can use the following command

(Note: this assumes you are not root and sets the permissions of the database files via sudo)
(Note: make sure to shut down the database first before you run the script)

## E-Mail testing

Authentik e-mails can be checked locally via [Mailpit mailserver](https://mailpit.axllent.org/).

### Prepare and start

In the `authentik/` directory start authentik and mailserver:

```bash
docker-compose -f docker-compose.yml -f docker-compose.test.yml up
```

### Example

The given setup can be tested via [Authentik's e-mail testing tool](https://github.com/goauthentik/authentik/blob/main/authentik/stages/email/management/commands/test_email.py)

Send a test email with:
```bash
docker compose exec worker ak test_email [email protected]
```

Visit [Mailpit](http://localhost:8025) and see your test email.
22 changes: 22 additions & 0 deletions authentik/docker-compose.test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
x-mail-settings: &x-mail-settings
environment:
- AUTHENTIK_EMAIL__HOST=mailserver
- AUTHENTIK_EMAIL__PORT=1025
- AUTHENTIK_EMAIL__USE_TLS=false
- AUTHENTIK_EMAIL__USE_SSL=false
- AUTHENTIK_EMAIL__TIMEOUT=10
- [email protected]

services:
mailserver:
image: axllent/mailpit
container_name: mailpit
restart: unless-stopped
ports:
- 8025:8025
- 1025:1025

server:
<<: *x-mail-settings
worker:
<<: *x-mail-settings
2 changes: 0 additions & 2 deletions authentik/docker-compose.yml
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
version: "3.4"

services:
postgresql:
image: docker.io/library/postgres:12-alpine
Expand Down
12 changes: 0 additions & 12 deletions backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,6 @@ The following commands are available:
| **Maintenance** | |
| `npm run update` | Check for updates |

### Docker

Docker can be run in development mode utilizing `docker-compose.overwrite.yml`:
```bash
docker compose up
```

Docker can be run in production mode:
```bash
docker compose -f docker-compose.yml up
```

### Update

You can get a list of packes to update by running `npm run update`.
Expand Down
40 changes: 0 additions & 40 deletions backend/docker-compose.override.yml

This file was deleted.

28 changes: 0 additions & 28 deletions backend/docker-compose.yml

This file was deleted.

Loading

0 comments on commit 05d4f2c

Please sign in to comment.