From eee8c9960be945bd2a962e669678e47bf7097aae Mon Sep 17 00:00:00 2001 From: lonkaars Date: Mon, 26 Apr 2021 13:41:01 +0200 Subject: experimental install script --- config | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/config b/config index 214184e..43ebcd3 100755 --- a/config +++ b/config @@ -43,12 +43,6 @@ voerbak() { cd .. } -customize_config() { - sed "s#{{ connect4_dir }}#$CONNECT4_WEB_ROOT#g" -i ./api.systemd.conf - sed "s/{{ connect4_user }}/$(whoami)/g" -i ./api.systemd.conf - sed "s/user nobody/user $(whoami)/" -i ./nginx.conf -} - build() { customize_config npx next build @@ -66,6 +60,20 @@ all() { voerbak } +customize_config() { + sed "s#{{ connect4_dir }}#$CONNECT4_WEB_ROOT#g" -i ./api.systemd.conf + sed "s/{{ connect4_user }}/$(whoami)/g" -i ./api.systemd.conf + sed "s/user nobody/user $(whoami)/" -i ./nginx.conf +} + +prod() { + sed "s/CONNECT4_DEBUG=1/CONNECT4_DEBUG=0/" -i .env + npx next build + npx next export + rm -rfv $CONNECT4_WEB_ROOT + mv out $CONNECT4_WEB_ROOT +} + if [[ -z $1 ]]; then all exit -- cgit v1.2.3