website/docs: misc changes to full dev environment setup (#15937)

* website/docs: misc changes to full dev environment setup

Yes, I redid my setup tonight, how did you know?

* Update website/docs/developer-docs/setup/full-dev-environment.mdx

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>

* Update website/docs/developer-docs/setup/full-dev-environment.mdx

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>

* Update website/docs/developer-docs/setup/full-dev-environment.mdx

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>

* Update website/docs/developer-docs/setup/full-dev-environment.mdx

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Signed-off-by: Dewi Roberts <dewi@goauthentik.io>

* add worker threads hint

---------

Signed-off-by: Dewi Roberts <dewi@goauthentik.io>
Co-authored-by: Dewi Roberts <dewi@goauthentik.io>
Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
This commit is contained in:
Simonyi Gergő
2025-09-03 15:47:06 +02:00
committed by GitHub
parent f6bb48bf3d
commit 3044071290

View File

@@ -82,7 +82,7 @@ libgss-dev \
krb5-config \
libkrb5-dev \
postgresql-server-dev-all \
postresql \
postgresql \
redis
```
@@ -120,45 +120,29 @@ Create a local configuration file that uses the local databases for development:
make gen-dev-config
```
### Understanding the architecture
### Initialize the database
authentik is primarily a Django application running under gunicorn, proxied by a Go application that serves static files.
For better code navigation, most functions and classes have type hints and docstrings. We recommend installing a Python Type-checking Extension in your IDE.
## 4. Set up the frontend
Even if you're not planning to develop the UI, you need to build the frontend as no compiled bundle is included by default.
### Running database migrations
First, apply all database migrations:
Run all migrations with the following command:
```shell
make migrate
```
### Generating schema files
Generate the required schema files and TypeScript client:
```shell
make gen
```
:::info
After making changes to the authentik API, you must re-run `make gen` to update the API library used by the UI.
If you ever want to start over, use `make dev-reset` which drops and restores the authentik PostgreSQL database to the state after `make migrate`.
:::
### Understanding the architecture
authentik is primarily a Django application running under gunicorn, proxied by a Go application that serves static files.
Most functions and classes have type hints and docstrings. For better code navigation, we recommend installing a Python Type-checking Extension in your IDE.
## 4. Set up the frontend
Even if you're not planning to develop the UI, you need to build the frontend as no compiled bundle is included by default.
### Building the UI
You have several options for building the UI:
#### One-time build
```shell
make web-build
```
#### Live development mode
For real-time feedback as you make changes:
@@ -167,30 +151,32 @@ For real-time feedback as you make changes:
make web-watch
```
#### Formatting frontend code
After making changes:
Or instead, if you just want to build it once:
```shell
make web
make web-build
```
## 5. Running authentik
Now that the backend and frontend have been set up and built, you can start authentik.
Start the server by running the following command in the same directory as your local authentik git repository:
Start the server:
```shell
make run-server
```
Start the worker by running the following command in the same directory as your local authentik git repository:
In a separate process, start the worker:
```shell
make run-worker
```
:::info
The very first time a worker runs, it might need some time to clear the initial task queue. Adjust [`AUTHENTIK_WORKER__THREADS`](../../../install-config/configuration/#authentik_worker__threads) as required.
:::
Both processes need to run to get a fully functioning authentik development environment.
authentik will be accessible at http://localhost:9000.
@@ -200,13 +186,7 @@ authentik will be accessible at http://localhost:9000.
To set a password for the default admin user (**akadmin**):
1. Navigate to http://localhost:9000/if/flow/initial-setup/ in your browser.
2. Follow the setup wizard to create your admin account.
:::info
To define a password for the default admin (called **akadmin**), you can manually enter the `/if/flow/initial-setup/` path in the browser address bar to launch the initial flow. Example: http://localhost:9000/if/flow/initial-setup/.
In case of issues in this process, feel free to use `make dev-reset` which drops and restores the authentik PostgreSQL instance to a "fresh install" state.
:::
2. Follow the prompts to set up your admin account.
### Hot-reloading
@@ -267,7 +247,7 @@ make all
### Submitting your changes
Once your code passes all checks, you can submit a pull request through [GitHub](https://github.com/goauthentik/authentik/pulls). Be sure to:
After your code passes all checks, submit a pull request on [GitHub](https://github.com/goauthentik/authentik/pulls). Be sure to:
- Provide a clear description of your changes
- Reference any related issues