nix-configs/schrottserver/penpot.nix

81 lines
2.9 KiB
Nix
Raw Normal View History

2023-03-05 09:56:03 +00:00
{ pkgs, inputs, ... }:
{
imports = [ inputs.arion.nixosModules.arion ];
virtualisation.docker.enable = true;
virtualisation.arion = {
backend = "docker";
projects.penpot.settings = {
networks.penpot.name = "penpot";
services = {
"penpot-backend".service = {
image = "penpotapp/backend:latest";
2023-03-06 19:00:42 +00:00
volumes = [ "/penpot_assets:/var/lib/penpot/data/assets" ];
2023-03-05 09:56:03 +00:00
restart = "always";
depends_on = [ "penpot-postgres" "penpot-redis" ];
networks = [ "penpot" ];
environment = {
"PENPOT_FLAGS" = "enable-registration enable-login-with-password disable-email-verification enable-smtp enable-prepl-server";
2023-03-06 19:00:42 +00:00
"PENPOT_PREPL_HOST" = "0.0.0.0";
2023-03-05 09:56:03 +00:00
"PENPOT_PUBLIC_URI" = "https://pp.schrottkatze.de";
2023-03-06 19:00:42 +00:00
2023-03-05 09:56:03 +00:00
"PENPOT_DATABASE_URI" = "postgresql://penpot-postgres/penpot";
"PENPOT_DATABASE_USERNAME" = "penpot";
2023-03-06 19:00:42 +00:00
"PENPOT_DATABASE_PASSWORD" = "penpot";
"PENPOT_REDIS_URI" = "redis://penpot-redis/0";
2023-03-05 09:56:03 +00:00
"PENPOT_ASSETS_STORAGE_BACKEND" = "assets-fs";
2023-03-06 19:00:42 +00:00
"PENPOT_STORAGE_ASSETS_FS_DIRECTORY" = "/var/lib/penpot/data/assets";
2023-03-05 09:56:03 +00:00
"PENPOT_TELEMETRY_ENABLED" = "false";
2023-03-06 19:00:42 +00:00
2023-03-05 09:56:03 +00:00
"PENPOT_SMTP_DEFAULT_FROM" = "noreply-pp@schrottkatze.de";
"PENPOT_SMTP_DEFAULT_REPLY_TO" = "noreply-pp@schrottkatze.de";
"PENPOT_SMTP_HOST" = "smtp.migadu.com";
2023-03-06 19:00:42 +00:00
"PENPOT_SMTP_PORT" = "587";
2023-03-05 09:56:03 +00:00
"PENPOT_SMTP_USERNAME" = "noreply-pp@schrottkatze.de";
"PENPOT_SMTP_PASSWORD" = builtins.readFile ../secret-data/penpot-smtp-pass;
"PENPOT_SMTP_TLS" = "true";
"PENPOT_SMTP_SSL" = "false";
};
};
"penpot-frontend".service = {
image = "penpotapp/frontend:latest";
restart = "always";
ports = [ "9001:80" ];
2023-03-06 19:00:42 +00:00
volumes = [ "/penpot_assets:/var/lib/penpot/data/assets" ];
2023-03-05 09:56:03 +00:00
depends_on = [ "penpot-backend" "penpot-exporter" ];
networks = [ "penpot" ];
};
"penpot-exporter".service = {
image = "penpotapp/exporter:latest";
restart = "always";
networks = [ "penpot" ];
environment = {
"PENPOT_PUBLIC_URI" = "http://penpot-frontend";
"PENPOT_REDIS_URI" = "redis://penpot-redis/0";
};
};
"penpot-postgres".service = {
image = "postgres:15";
restart = "always";
stop_signal = "SIGINT";
volumes = [ "/penpot_postgres_v15:/var/lib/postgresql/data" ];
networks = [ "penpot" ];
environment = {
"POSTGRES_INITDB_ARGS" = "--data-checksums";
"POSTGRES_DB" = "penpot";
"POSTGRES_USER" = "penpot";
"POSTGRES_PASSWORD" = "penpot";
};
};
"penpot-redis".service = {
image = "redis:7";
restart = "always";
networks = [ "penpot" ];
};
};
};
};
}