feat(deploy): automated deployment of development server via devenv nix

This commit is contained in:
Zhongheng Liu 2024-05-25 23:07:22 +03:00
commit f46ad1d65b
No known key found for this signature in database

View file

@ -2,17 +2,14 @@
{
# https://devenv.sh/basics/
env.GREET = "devenv";
cachix.enable = false;
# https://devenv.sh/packages/
packages = [ pkgs.git ];
# https://devenv.sh/scripts/
scripts.hello.exec = "echo hello from $GREET";
enterShell = ''
hello
git --version
echo "devenv up : to execute the epq chat application"
'';
# https://devenv.sh/tests/
@ -41,7 +38,25 @@
pre-commit.hooks.commitizen.enable = true;
# 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/
}