forked from Fediversity/Fediversity
Closes #76. Note I had not yet manage to successfully test this. Manually trying the parameterized NixOps4 I tried using the following command, tho I had yet to get this to work as well: ```sh DEPLOYMENT='{"domain": "fediversity.net", "mastodon": {"enable": false}, "pixelfed": {"enable": true}, "peertube": {"enable": false}}' nix develop --extra-experimental-features "configurable-impure-env" --command nixops4 apply test ``` (or rather, I used a hardcoded Nix here so as to make it not use Lix.) So far this had failed for me with: ``` the following units failed: acme-mastodon.web.garage.fediversity.net.service ... nixops4 error: Failed to create resource garage-configuration ```
62 lines
1.7 KiB
Markdown
62 lines
1.7 KiB
Markdown
# Fediversity Panel
|
|
|
|
The Fediversity Panel is a web service for managing Fediversity deployments with a graphical user interface, written in Django.
|
|
|
|
## Development
|
|
|
|
- In your [nix.conf](https://nix.dev/manual/nix/latest/command-ref/conf-file) (Nix) / `nix.settings` (NixOS),
|
|
to your [`experimental-features`](https://nix.dev/manual/nix/latest/command-ref/conf-file#conf-experimental-features)
|
|
add [`configurable-impure-env`](https://nix.dev/manual/nix/latest/development/experimental-features#xp-feature-configurable-impure-env).
|
|
Note that this features is only available in Nix, not in Lix.
|
|
|
|
- To obtain all tools related to this project, enter the development environment with `nix-shell`.
|
|
|
|
If you want to do that automatically on entering this directory:
|
|
|
|
- [Set up `direnv`](https://github.com/nix-community/nix-direnv#installation)
|
|
- Run `direnv allow` in the directory where repository is stored on your machine
|
|
|
|
> **Note**
|
|
>
|
|
> This is a security boundary, and allows automatically running code from this repository on your machine.
|
|
|
|
- Run NixOS integration tests and Django unit tests:
|
|
|
|
```bash
|
|
nix-build -A tests
|
|
```
|
|
|
|
- List all available Django management commands with:
|
|
|
|
```shell-session
|
|
manage
|
|
```
|
|
|
|
- With a fresh database, run:
|
|
|
|
```
|
|
manage migrate
|
|
```
|
|
|
|
- Run the server locally:
|
|
|
|
```shell-session
|
|
manage runserver
|
|
```
|
|
|
|
- Create an admin user:
|
|
|
|
```shell-session
|
|
manage createsuperuser
|
|
```
|
|
|
|
and log in at <http://localhost:8000/admin>.
|
|
|
|
- After changing the database schema, add migrations and apply them:
|
|
|
|
```shell-session
|
|
manage makemigrations
|
|
manage migrate
|
|
```
|
|
|
|
- Use the [Django Debug Toolbar](https://github.com/django-commons/django-debug-toolbar) for troubleshooting in the browser
|