feat(deploy): automated deployment of development server via devenv nix
This commit is contained in:
parent
38da9fad1f
commit
f46ad1d65b
1 changed files with 21 additions and 6 deletions
27
devenv.nix
27
devenv.nix
|
@ -2,17 +2,14 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
# https://devenv.sh/basics/
|
# https://devenv.sh/basics/
|
||||||
env.GREET = "devenv";
|
|
||||||
cachix.enable = false;
|
|
||||||
# https://devenv.sh/packages/
|
# https://devenv.sh/packages/
|
||||||
packages = [ pkgs.git ];
|
packages = [ pkgs.git ];
|
||||||
|
|
||||||
# https://devenv.sh/scripts/
|
# https://devenv.sh/scripts/
|
||||||
scripts.hello.exec = "echo hello from $GREET";
|
|
||||||
|
|
||||||
enterShell = ''
|
enterShell = ''
|
||||||
hello
|
|
||||||
git --version
|
git --version
|
||||||
|
echo "devenv up : to execute the epq chat application"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# https://devenv.sh/tests/
|
# https://devenv.sh/tests/
|
||||||
|
@ -41,7 +38,25 @@
|
||||||
pre-commit.hooks.commitizen.enable = true;
|
pre-commit.hooks.commitizen.enable = true;
|
||||||
|
|
||||||
# https://devenv.sh/processes/
|
# https://devenv.sh/processes/
|
||||||
# processes.ping.exec = "ping example.com";
|
processes = {
|
||||||
|
epqchat-dev.exec = "${pkgs.maven}/bin/mvn spring-boot:run";
|
||||||
|
};
|
||||||
|
services.mysql = {
|
||||||
|
enable = true;
|
||||||
|
package = pkgs.mariadb;
|
||||||
|
initialDatabases = [
|
||||||
|
{ name = "epqchat"; }
|
||||||
|
];
|
||||||
|
ensureUsers = [
|
||||||
|
{
|
||||||
|
name = "epqchatuser";
|
||||||
|
password = "epqlevel3artifact";
|
||||||
|
ensurePermissions = {
|
||||||
|
"epqchat.*" = "ALL PRIVILEGES";
|
||||||
|
"*.*" = "SELECT, LOCK TABLES";
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
# See full reference at https://devenv.sh/reference/options/
|
# See full reference at https://devenv.sh/reference/options/
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue