diff options
author | lonkaars <loek@pipeframe.xyz> | 2021-04-26 13:41:01 +0200 |
---|---|---|
committer | lonkaars <loek@pipeframe.xyz> | 2021-04-26 13:41:01 +0200 |
commit | eee8c9960be945bd2a962e669678e47bf7097aae (patch) | |
tree | ddeab0659e797dcfa2866d9c9941e52d9a4f2583 | |
parent | 1ea5a7bcdd4c48a0d060d80dea0a828de547a181 (diff) |
experimental install script
-rwxr-xr-x | config | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -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 |