Fix 5d-diplomacy volume and build setup
This commit is contained in:
parent
cf8e4dab2b
commit
9f7b46f947
|
@ -3,7 +3,18 @@
|
||||||
imports = [ ./generated.nix ];
|
imports = [ ./generated.nix ];
|
||||||
|
|
||||||
satellite.cloudflared.at.dip.port = config.satellite.ports."5d-diplomacy";
|
satellite.cloudflared.at.dip.port = config.satellite.ports."5d-diplomacy";
|
||||||
|
|
||||||
virtualisation.oci-containers.containers."5d-diplomacy-frontend".ports = [
|
virtualisation.oci-containers.containers."5d-diplomacy-frontend".ports = [
|
||||||
"${toString config.satellite.ports."5d-diplomacy"}:8080"
|
"${toString config.satellite.ports."5d-diplomacy"}:8080"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
virtualisation.oci-containers.containers."5d-diplomacy-mssql".volumes =
|
||||||
|
let
|
||||||
|
dataDir = "/persist/state/var/lib/5d-diplomacy";
|
||||||
|
in
|
||||||
|
[
|
||||||
|
"${dataDir}/mssql-data/data:/var/opt/mssql/data:rw"
|
||||||
|
"${dataDir}/mssql-data/log:/var/opt/mssql/log:rw"
|
||||||
|
"${dataDir}/mssql-data/secrets:/var/opt/mssql/secrets:rw"
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
{ pkgs, lib, ... }:
|
{ pkgs, lib, ... }:
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
# Containers
|
# Containers
|
||||||
virtualisation.oci-containers.containers."5d-diplomacy-backend" = {
|
virtualisation.oci-containers.containers."5d-diplomacy-backend" = {
|
||||||
image = "localhost/compose2nix-5d-diplomacy-backend";
|
image = "localhost/compose2nix-5d-diplomacy-backend";
|
||||||
|
@ -34,7 +35,6 @@
|
||||||
};
|
};
|
||||||
virtualisation.oci-containers.containers."5d-diplomacy-frontend" = {
|
virtualisation.oci-containers.containers."5d-diplomacy-frontend" = {
|
||||||
image = "localhost/compose2nix-5d-diplomacy-frontend";
|
image = "localhost/compose2nix-5d-diplomacy-frontend";
|
||||||
ports = [ "127.0.0.1:5173:8080/tcp" ];
|
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
"--network-alias=frontend"
|
"--network-alias=frontend"
|
||||||
|
@ -65,11 +65,6 @@
|
||||||
"ACCEPT_EULA" = "y";
|
"ACCEPT_EULA" = "y";
|
||||||
"MSSQL_SA_PASSWORD" = "Passw0rd@";
|
"MSSQL_SA_PASSWORD" = "Passw0rd@";
|
||||||
};
|
};
|
||||||
volumes = [
|
|
||||||
"/home/moon/projects/5d-diplomacy-with-multiverse-time-travel/mssql-data/data:/var/opt/mssql/data:rw"
|
|
||||||
"/home/moon/projects/5d-diplomacy-with-multiverse-time-travel/mssql-data/log:/var/opt/mssql/log:rw"
|
|
||||||
"/home/moon/projects/5d-diplomacy-with-multiverse-time-travel/mssql-data/secrets:/var/opt/mssql/secrets:rw"
|
|
||||||
];
|
|
||||||
user = "root";
|
user = "root";
|
||||||
log-driver = "journald";
|
log-driver = "journald";
|
||||||
extraOptions = [
|
extraOptions = [
|
||||||
|
@ -114,8 +109,7 @@
|
||||||
TimeoutSec = 300;
|
TimeoutSec = 300;
|
||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
cd /home/moon/projects/5d-diplomacy-with-multiverse-time-travel/server
|
docker build -t compose2nix-5d-diplomacy-backend https://github.com/Oliveriver/5d-diplomacy-with-multiverse-time-travel.git:server
|
||||||
docker build -t compose2nix-5d-diplomacy-backend .
|
|
||||||
'';
|
'';
|
||||||
partOf = [ "docker-compose-5d-diplomacy-root.target" ];
|
partOf = [ "docker-compose-5d-diplomacy-root.target" ];
|
||||||
wantedBy = [ "docker-compose-5d-diplomacy-root.target" ];
|
wantedBy = [ "docker-compose-5d-diplomacy-root.target" ];
|
||||||
|
@ -131,8 +125,7 @@
|
||||||
TimeoutSec = 300;
|
TimeoutSec = 300;
|
||||||
};
|
};
|
||||||
script = ''
|
script = ''
|
||||||
cd /home/moon/projects/5d-diplomacy-with-multiverse-time-travel/client
|
docker build -t compose2nix-5d-diplomacy-frontend https://github.com/Oliveriver/5d-diplomacy-with-multiverse-time-travel.git:client
|
||||||
docker build -t compose2nix-5d-diplomacy-frontend .
|
|
||||||
'';
|
'';
|
||||||
partOf = [ "docker-compose-5d-diplomacy-root.target" ];
|
partOf = [ "docker-compose-5d-diplomacy-root.target" ];
|
||||||
wantedBy = [ "docker-compose-5d-diplomacy-root.target" ];
|
wantedBy = [ "docker-compose-5d-diplomacy-root.target" ];
|
||||||
|
|
Loading…
Reference in a new issue