2024-03-07 16:48:08 +01:00
|
|
|
{pkgs, ...}: {
|
|
|
|
project.name = "git";
|
|
|
|
|
|
|
|
networks.dmz = {
|
|
|
|
name = "dmz";
|
|
|
|
external = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
networks.transport = {};
|
|
|
|
|
|
|
|
services = {
|
|
|
|
forgejo.service = {
|
2024-03-31 22:05:29 +02:00
|
|
|
image = "codeberg.org/forgejo/forgejo:1.21.8-0";
|
2024-03-07 16:48:08 +01:00
|
|
|
container_name = "forgejo";
|
|
|
|
useHostStore = true;
|
|
|
|
labels = {
|
|
|
|
"traefik.enable" = "true";
|
|
|
|
"traefik.http.routers.forgejo.entrypoints" = "websecure";
|
|
|
|
"traefik.http.routers.forgejo.rule" = "Host(`git.ghoscht.com`)";
|
|
|
|
"traefik.http.services.forgejo.loadbalancer.server.port" = "3000";
|
|
|
|
"traefik.docker.network" = "dmz";
|
|
|
|
"traefik.http.routers.forgejo.tls" = "true";
|
|
|
|
"traefik.http.routers.forgejo.tls.certresolver" = "letsencrypt";
|
|
|
|
};
|
|
|
|
volumes = [
|
2024-03-31 22:05:29 +02:00
|
|
|
"/storage/dataset/docker/git/forgejo_data:/data"
|
2024-03-07 16:48:08 +01:00
|
|
|
"/etc/localtime:/etc/localtime:ro"
|
|
|
|
];
|
|
|
|
ports = [
|
|
|
|
"2222:22"
|
|
|
|
];
|
2024-03-17 15:18:23 +01:00
|
|
|
dns = ["1.1.1.1"];
|
2024-03-07 16:48:08 +01:00
|
|
|
environment = {
|
|
|
|
USER_UID = 1000;
|
|
|
|
USER_GID = 1000;
|
|
|
|
GITEA__database__DB_TYPE = "postgres";
|
2024-03-17 15:18:23 +01:00
|
|
|
GITEA__database__HOST = "git-db:5432";
|
2024-03-07 16:48:08 +01:00
|
|
|
};
|
|
|
|
env_file = [
|
|
|
|
"/home/ghoscht/.docker/git/forgejo.env"
|
|
|
|
];
|
|
|
|
restart = "unless-stopped";
|
|
|
|
networks = [
|
|
|
|
"dmz"
|
|
|
|
"transport"
|
|
|
|
];
|
|
|
|
};
|
2024-03-17 15:18:23 +01:00
|
|
|
git-db.service = {
|
2024-03-07 16:48:08 +01:00
|
|
|
image = "postgres:15.3-bullseye";
|
|
|
|
env_file = [
|
|
|
|
"/home/ghoscht/.docker/git/forgejo-db.env"
|
|
|
|
];
|
2024-03-31 22:05:29 +02:00
|
|
|
volumes = [
|
|
|
|
"/storage/dataset/docker/git/forgejo_db:/var/lib/postgresql/data"
|
|
|
|
];
|
2024-03-07 16:48:08 +01:00
|
|
|
restart = "unless-stopped";
|
|
|
|
networks = [
|
|
|
|
"transport"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|