Compare commits
2 Commits
0cc5dcef92
...
961d5f430f
| Author | SHA1 | Date | |
|---|---|---|---|
|
961d5f430f
|
|||
|
674e945d7e
|
@ -3,46 +3,50 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
virtualisation.oci-containers.containers.gitea-runner = {
|
||||
image = "gitea/act_runner:latest"; # NOTE: vegardit has other runner images
|
||||
autoStart = true;
|
||||
}: let
|
||||
runnerVersion = "0.2.12";
|
||||
in {
|
||||
virtualisation.oci-containers.containers = {
|
||||
gitea-runner = {
|
||||
image = "gitea/act_runner:${runnerVersion}"; # NOTE: vegardit has other runner images
|
||||
autoStart = true;
|
||||
|
||||
login = {
|
||||
# Uses DockerHub by default
|
||||
# registry = "";
|
||||
login = {
|
||||
# Uses DockerHub by default
|
||||
# registry = "";
|
||||
|
||||
# DockerHub Credentials
|
||||
username = "christoph.urlacher@protonmail.com";
|
||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||
# DockerHub Credentials
|
||||
username = "christoph.urlacher@protonmail.com";
|
||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||
};
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [];
|
||||
|
||||
volumes = [
|
||||
"gitea-runner_data:/data"
|
||||
"gitea-runner_config:/config" # Managed by env variables for vegardit image
|
||||
|
||||
"/var/run/docker.sock:/var/run/docker.sock" # Disable for dind
|
||||
];
|
||||
|
||||
environment = {
|
||||
# gitlab.local.chriphost.de doesn't work, because it gets resolved to 192.168.86.25:443, which is nginx
|
||||
GITEA_INSTANCE_URL = "http://192.168.86.25:3000";
|
||||
GITEA_RUNNER_NAME = "servenix";
|
||||
|
||||
# Can be generated from inside the container using act_runner generate-config > /config/config.yaml
|
||||
CONFIG_FILE = "/config/config.yaml";
|
||||
|
||||
# This token is invalid, when re-registering is needed it has to be refreshed
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN = "Mq6wr0dPthqDij3iaryP8s5VYZA5kPfOQbHA6wm6";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
# "--privileged" # Enable for dind
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [];
|
||||
|
||||
volumes = [
|
||||
"gitea-runner_data:/data"
|
||||
"gitea-runner_config:/config" # Managed by env variables for vegardit image
|
||||
|
||||
"/var/run/docker.sock:/var/run/docker.sock" # Disable for dind
|
||||
];
|
||||
|
||||
environment = {
|
||||
# NOTE: gitlab.local.chriphost.de doesn't work, because it gets resolved to 192.168.86.25:443, which is nginx
|
||||
GITEA_INSTANCE_URL = "http://192.168.86.25:3000";
|
||||
GITEA_RUNNER_NAME = "servenix";
|
||||
|
||||
# Can be generated from inside the container using act_runner generate-config > /config/config.yaml
|
||||
CONFIG_FILE = "/config/config.yaml";
|
||||
|
||||
# NOTE: This token is invalid, when re-registering is needed it has to be refreshed
|
||||
GITEA_RUNNER_REGISTRATION_TOKEN = "Mq6wr0dPthqDij3iaryP8s5VYZA5kPfOQbHA6wm6";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
# "--privileged" # Enable for dind
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
@ -3,7 +3,9 @@
|
||||
lib,
|
||||
pkgs,
|
||||
...
|
||||
}: {
|
||||
}: let
|
||||
giteaVersion = "1.24.2";
|
||||
in {
|
||||
users = {
|
||||
groups.git = {};
|
||||
|
||||
@ -19,83 +21,85 @@
|
||||
};
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.gitea-db = {
|
||||
image = "postgres:14";
|
||||
autoStart = true;
|
||||
virtualisation.oci-containers.containers = {
|
||||
gitea-db = {
|
||||
image = "postgres:14";
|
||||
autoStart = true;
|
||||
|
||||
login = {
|
||||
# Uses DockerHub by default
|
||||
# registry = "";
|
||||
login = {
|
||||
# Uses DockerHub by default
|
||||
# registry = "";
|
||||
|
||||
# DockerHub Credentials
|
||||
username = "christoph.urlacher@protonmail.com";
|
||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||
# DockerHub Credentials
|
||||
username = "christoph.urlacher@protonmail.com";
|
||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||
};
|
||||
|
||||
dependsOn = [];
|
||||
|
||||
ports = [];
|
||||
|
||||
volumes = [
|
||||
"gitea-db_data:/var/lib/postgresql/data"
|
||||
];
|
||||
|
||||
environment = {
|
||||
POSTGRES_USER = "gitea";
|
||||
POSTGRES_PASSWORD = "gitea";
|
||||
POSTGRES_DB = "gitea";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
|
||||
dependsOn = [];
|
||||
gitea = {
|
||||
image = "gitea/gitea:${giteaVersion}";
|
||||
autoStart = true;
|
||||
|
||||
ports = [];
|
||||
login = {
|
||||
# Uses DockerHub by default
|
||||
# registry = "";
|
||||
|
||||
volumes = [
|
||||
"gitea-db_data:/var/lib/postgresql/data"
|
||||
];
|
||||
# DockerHub Credentials
|
||||
username = "christoph.urlacher@protonmail.com";
|
||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||
};
|
||||
|
||||
environment = {
|
||||
POSTGRES_USER = "gitea";
|
||||
POSTGRES_PASSWORD = "gitea";
|
||||
POSTGRES_DB = "gitea";
|
||||
dependsOn = [
|
||||
"gitea-db"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"3000:3000"
|
||||
|
||||
# NOTE: Set .git/config url to ssh://christoph@gitea.local.chriphost.de:222/christoph/<repo>.git
|
||||
"222:222" # Gitea SSH
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"/etc/timezone:/etc/timezone:ro"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
|
||||
"gitea_data:/data"
|
||||
];
|
||||
|
||||
environment = {
|
||||
USER = "git";
|
||||
USER_UID = "500";
|
||||
# USER_GID = "100";
|
||||
|
||||
GITEA__database__DB_TYPE = "postgres";
|
||||
GITEA__database__HOST = "gitea-db:5432";
|
||||
GITEA__database__NAME = "gitea";
|
||||
GITEA__database__USER = "gitea";
|
||||
GITEA__database__PASSWD = "gitea";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
|
||||
virtualisation.oci-containers.containers.gitea = {
|
||||
image = "gitea/gitea:latest";
|
||||
autoStart = true;
|
||||
|
||||
login = {
|
||||
# Uses DockerHub by default
|
||||
# registry = "";
|
||||
|
||||
# DockerHub Credentials
|
||||
username = "christoph.urlacher@protonmail.com";
|
||||
passwordFile = "${config.sops.secrets.docker-password.path}";
|
||||
};
|
||||
|
||||
dependsOn = [
|
||||
"gitea-db"
|
||||
];
|
||||
|
||||
ports = [
|
||||
"3000:3000"
|
||||
|
||||
# NOTE: Set .git/config url to ssh://christoph@gitea.local.chriphost.de:222/christoph/<repo>.git
|
||||
"222:222" # Gitea SSH
|
||||
];
|
||||
|
||||
volumes = [
|
||||
"/etc/timezone:/etc/timezone:ro"
|
||||
"/etc/localtime:/etc/localtime:ro"
|
||||
|
||||
"gitea_data:/data"
|
||||
];
|
||||
|
||||
environment = {
|
||||
USER = "git";
|
||||
USER_UID = "500";
|
||||
# USER_GID = "100";
|
||||
|
||||
GITEA__database__DB_TYPE = "postgres";
|
||||
GITEA__database__HOST = "gitea-db:5432";
|
||||
GITEA__database__NAME = "gitea";
|
||||
GITEA__database__USER = "gitea";
|
||||
GITEA__database__PASSWD = "gitea";
|
||||
};
|
||||
|
||||
extraOptions = [
|
||||
"--net=behind-nginx"
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user