dev to basic spring #9
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
result/*
|
||||
result
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"enabled": 1,
|
||||
"hidden": false,
|
||||
"description": "Server",
|
||||
"nixexprinput": "generator",
|
||||
"nixexprpath": "flake.nix",
|
||||
"checkinterval": 300,
|
||||
"schedulingshares": 100,
|
||||
"enableemail": false,
|
||||
"emailoverride": "",
|
||||
"keepnr": 3,
|
||||
"inputs": {
|
||||
"main": {
|
||||
"type": "git",
|
||||
"value": "https://git.4o1x5.dev/learningpulse/server.git dev",
|
||||
"emailresponsible": false,
|
||||
|
||||
"gitea_repo_name": "server",
|
||||
"gitea_repo_owner": "learningpulse",
|
||||
"gitea_status_repo": "dev",
|
||||
"gite_http_url": "https://git.4o1x5.dev"
|
||||
},
|
||||
"nixpkgs": {
|
||||
"type": "git",
|
||||
"value": "https://github.com/NixOS/nixpkgs.git nixos-unstable",
|
||||
"emailresponsible": false
|
||||
}
|
||||
}
|
||||
}
|
17
flake.nix
17
flake.nix
|
@ -5,7 +5,6 @@
|
|||
};
|
||||
outputs = { self, nixpkgs, ... }:
|
||||
let
|
||||
|
||||
# TODO add more systems
|
||||
system = "x86_64-linux";
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
|
@ -30,12 +29,13 @@
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/${pname}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
|
||||
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
|
||||
'';
|
||||
};
|
||||
|
||||
learningpulse-eureka = pkgs.maven.buildMavenPackage rec {
|
||||
pname = "eureka";
|
||||
version = "0.0.1";
|
||||
|
@ -48,9 +48,9 @@
|
|||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/${pname}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
|
||||
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
|
||||
'';
|
||||
};
|
||||
|
@ -64,17 +64,18 @@
|
|||
mvnHash = "sha256-YCK1Qujgx73cZdEx2mRip+y+66px5TxL247fBIMyoy4=";
|
||||
|
||||
nativeBuildInputs = buildPackages;
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin $out/share/${pname}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}-${version}
|
||||
install -Dm644 ${pname}/target/${pname}-${version}.jar $out/share/${pname}
|
||||
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname}- \
|
||||
makeWrapper ${pkgs.jre8}/bin/java $out/bin/${pname} \
|
||||
--add-flags "-jar $out/share/${pname}/${pname}-${version}.jar"
|
||||
'';
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
hydraJobs = {
|
||||
inherit (self)
|
||||
packages;
|
||||
|
|
23
readme.md
Normal file
23
readme.md
Normal file
|
@ -0,0 +1,23 @@
|
|||
# LearningPulse server
|
||||
|
||||
## CI/CD
|
||||
|
||||
To check up on builds head to [the hydra server](https://hydra.4o1x5.dev/project/learningpulse)
|
||||
|
||||
### Enter developer shell
|
||||
|
||||
```bash
|
||||
nix develop
|
||||
```
|
||||
|
||||
### Build services
|
||||
|
||||
```bash
|
||||
nix build .#learningpulse-dummy
|
||||
```
|
||||
|
||||
### Run service
|
||||
|
||||
```bash
|
||||
nix develop && cd dummy && mvn run spring-boot:run
|
||||
```
|
2
result
2
result
|
@ -1 +1 @@
|
|||
/nix/store/v6lrgj18jgvwli3irsdabgj5nc712gfc-gateway-0.0.1
|
||||
/nix/store/zmnh05nkqyynsmshiqfhq28bj9iiww0i-gateway-0.0.1
|
Reference in a new issue