39 lines
1.5 KiB
Markdown
39 lines
1.5 KiB
Markdown
# Senfnvp Stack
|
||
|
||
The Senfnvp Stack contains Web Infra-structure.
|
||
|
||
|
||
## Notes
|
||
|
||
``` nix
|
||
senfnvp = {
|
||
enable = true;
|
||
hostname = "senfnvp.kb-one.de";
|
||
|
||
# Defaults
|
||
proxy.enable = true;
|
||
website.enable = true;
|
||
forgejo.enable = true;
|
||
forgejo.initializeDatabase = false; # Only use once!
|
||
forgejo.enableFail2Ban = true;
|
||
keycloak.enable = true;
|
||
keycloak.initializeDatabase = false; # Only use once!
|
||
docker-compose.enable = true; # Configuration for Docker-Compose support for Mailcow
|
||
};
|
||
```
|
||
|
||
### The Database
|
||
|
||
The Database Server is enabled when when you enable the Stack itself.
|
||
When you Activate a Service you might want to Edit the File at `./database/init-servicename.template.sql`. If you have a Database-Dump, place it there with the Naming-Sheme `./database/init-servicename.sql`. When creating a new Setup you can just run `cp init-servicename.template.sql init-servicename.sql` to use the template. The template only creates the Database, User and Password and lets it to the Service create its Tables.
|
||
|
||
Basically the order is like this:
|
||
- Create Secrets `sops ./secrets.yaml`
|
||
- Apply Template `cp ./database/init-forgejo.template.sql ./database/init-forgejo.sql`
|
||
- Initialize ´forgejo.enable = true; forgejo.initializeDatabase = true;`
|
||
- Apply config `nixos-rebuild switch --flake .`
|
||
- Wait for Initialisation
|
||
- Wait! Dumps will take time!
|
||
- Enable Production `forgejo.enable = true; forgejo.initializeDatabase = false;`
|
||
- Apply config `nixos-rebuild switch --flake .`
|
||
-
|