diff options
author | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-05-25 23:07:22 +0300 |
---|---|---|
committer | Zhongheng Liu <z.liu@outlook.com.gr> | 2024-05-25 23:07:22 +0300 |
commit | f46ad1d65b6205e086ecdb61f5cd2ffabcd98b58 (patch) | |
tree | bff659f0714bb48ca0355253b894abe676ab1b91 | |
parent | 38da9fad1f6361f2fea660d8f833e6c58ed964b3 (diff) | |
download | epq-api-f46ad1d65b6205e086ecdb61f5cd2ffabcd98b58.tar.gz epq-api-f46ad1d65b6205e086ecdb61f5cd2ffabcd98b58.tar.bz2 epq-api-f46ad1d65b6205e086ecdb61f5cd2ffabcd98b58.zip |
feat(deploy): automated deployment of development server via devenv nix
-rw-r--r-- | devenv.nix | 27 |
1 files changed, 21 insertions, 6 deletions
@@ -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/ } |