games: turns out I wasnt treating it properly like a docker-compose file
This commit is contained in:
parent
4052aeac6b
commit
2603cf9584
1 changed files with 55 additions and 61 deletions
|
@ -14,8 +14,8 @@
|
||||||
external = [];
|
external = [];
|
||||||
cname = [
|
cname = [
|
||||||
# create a sub-subdomain for each game
|
# create a sub-subdomain for each game
|
||||||
"mc_compsoc.games CNAME games"
|
"compsoc_classic.minecraft.games CNAME games"
|
||||||
"mc_compsoc2.games CNAME games"
|
"compsoc_test.minecraft.games CNAME games"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -24,70 +24,64 @@
|
||||||
backend = "docker";
|
backend = "docker";
|
||||||
projects = {
|
projects = {
|
||||||
|
|
||||||
mc_compsoc.settings = {
|
# this is basically one single docker-compose file
|
||||||
docker-compose.raw.networks.default.name = "mc_compsoc";
|
minecraft.settings = {
|
||||||
|
docker-compose.raw.networks.default.name = "minecraft";
|
||||||
services.mc_compsoc = {
|
|
||||||
service.image = "nimmis/spigot:latest";
|
|
||||||
# setting these here as they arent special
|
|
||||||
service.environment = {
|
|
||||||
# this is what it last ran on
|
|
||||||
SPIGOT_VER="1.18.2";
|
|
||||||
EULA="true";
|
|
||||||
};
|
|
||||||
|
|
||||||
service.volumes = [
|
|
||||||
# figure out what this needs and use itt o get up and running
|
|
||||||
# /home/nimmis/mc-srv:/minecraft
|
|
||||||
"/etc/games/minecraft/compsoc/test/config:/minecraft"
|
|
||||||
];
|
|
||||||
service.ports = [
|
|
||||||
"25565:25565/tcp"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
mc_compsoc2.settings = {
|
|
||||||
docker-compose.raw.networks.default.name = "mc_compsoc2";
|
|
||||||
|
|
||||||
services.mc_compsoc = {
|
|
||||||
service.image = "nimmis/spigot:latest";
|
|
||||||
# setting these here as they arent special
|
|
||||||
service.environment = {
|
|
||||||
# this is what it last ran on
|
|
||||||
SPIGOT_VER="1.18.2";
|
|
||||||
EULA="true";
|
|
||||||
};
|
|
||||||
|
|
||||||
service.volumes = [
|
|
||||||
# figure out what this needs and use itt o get up and running
|
|
||||||
# /home/nimmis/mc-srv:/minecraft
|
|
||||||
"/etc/games/minecraft/compsoc/test2/config:/minecraft"
|
|
||||||
];
|
|
||||||
service.ports = [
|
|
||||||
"25566:25565/tcp"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
services = {
|
services = {
|
||||||
nginx.virtualHosts = {
|
mc_proxy = {
|
||||||
"mc_compsoc.games.skynet.ie" = {
|
service = {
|
||||||
forceSSL = true;
|
image = "ghcr.io/haveachin/infrared:1.3.3";
|
||||||
useACMEHost = "skynet";
|
environment = {
|
||||||
|
INFRARED_CONFIG_PATH = "/configs";
|
||||||
locations."/".proxyPass = "http://localhost:25565";
|
|
||||||
};
|
};
|
||||||
|
|
||||||
"mc_compsoc2.games.skynet.ie" = {
|
volumes = [ "/etc/games/minecraft/proxy:/configs" ];
|
||||||
forceSSL = true;
|
ports = [
|
||||||
useACMEHost = "skynet";
|
"25565:25565/tcp"
|
||||||
|
];
|
||||||
|
|
||||||
locations."/".proxyPass = "http://localhost:25566";
|
expose = [
|
||||||
|
"25565"
|
||||||
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
mc_compsoc = {
|
||||||
|
service = {
|
||||||
|
image = "nimmis/spigot:latest";
|
||||||
|
# setting these here as they arent special
|
||||||
|
environment = {
|
||||||
|
# this is what it last ran on
|
||||||
|
SPIGOT_VER="1.18.2";
|
||||||
|
EULA="true";
|
||||||
|
};
|
||||||
|
|
||||||
|
# where the config files are stored
|
||||||
|
volumes = [ "/etc/games/minecraft/compsoc/test/config:/minecraft" ];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
mc_compsoc2 = {
|
||||||
|
service = {
|
||||||
|
image = "nimmis/spigot:latest";
|
||||||
|
environment = {
|
||||||
|
# this is what it last ran on
|
||||||
|
SPIGOT_VER="1.18.2";
|
||||||
|
EULA="true";
|
||||||
|
};
|
||||||
|
|
||||||
|
# where the config files are stored
|
||||||
|
volumes = [ "/etc/games/minecraft/compsoc/test2/config:/minecraft" ];
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# next game here
|
||||||
|
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
Loading…
Reference in a new issue