Use personal devshell fork
This commit is contained in:
parent
40f2eb127c
commit
725fe830f8
3 changed files with 27 additions and 42 deletions
|
@ -1,18 +1,18 @@
|
|||
{ pkgs, inputs }:
|
||||
let
|
||||
support-procfile-text = ''
|
||||
memcached: memcached
|
||||
mysql: mysql
|
||||
worker: rails jobs:work
|
||||
css: yarn build:css --watch
|
||||
js: yarn build:js --watch
|
||||
'';
|
||||
support-procfile = pkgs.writeText "Procfile.supp" support-procfile-text;
|
||||
all-procfile-text = support-procfile-text + ''
|
||||
server: rails s -p 3000
|
||||
'';
|
||||
all-procfile = pkgs.writeText "Procfile.all" all-procfile-text;
|
||||
|
||||
support-services = {
|
||||
memcached.command = "memcached";
|
||||
mysql.command = "mysql";
|
||||
worker.command = "rails jobs:work";
|
||||
css.command = "yarn build:css --watch";
|
||||
js.command = "yarn build:js --watch";
|
||||
};
|
||||
all-services = support-services // {
|
||||
rails = {
|
||||
name = "server";
|
||||
command = "rails s -p 3000";
|
||||
};
|
||||
};
|
||||
in
|
||||
pkgs.devshell.mkShell {
|
||||
name = "Dodona";
|
||||
|
@ -53,27 +53,11 @@ pkgs.devshell.mkShell {
|
|||
docker run --name dodona-db -p 3306:3306 --rm -v dodona-db-data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=dodona mariadb:latest
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "server-support";
|
||||
category = "general commands";
|
||||
help = "Run everything required for a server";
|
||||
command = ''
|
||||
bundle install
|
||||
yarn install
|
||||
${pkgs.honcho}/bin/honcho start -f ${support-procfile} -d $PRJ_ROOT
|
||||
'';
|
||||
}
|
||||
{
|
||||
name = "server";
|
||||
category = "general commands";
|
||||
help = "Run everything";
|
||||
command = ''
|
||||
bundle install
|
||||
yarn install
|
||||
${pkgs.honcho}/bin/honcho start -f ${all-procfile} -d $PRJ_ROOT
|
||||
'';
|
||||
}
|
||||
];
|
||||
serviceGroups = {
|
||||
server.services = all-services;
|
||||
server-support.services = support-services;
|
||||
};
|
||||
language.c = {
|
||||
compiler = pkgs.gcc;
|
||||
includes = [ pkgs.libmysqlclient pkgs.zlib pkgs.libffi ];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue