aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2021-04-26 13:41:01 +0200
committerlonkaars <loek@pipeframe.xyz>2021-04-26 13:41:01 +0200
commiteee8c9960be945bd2a962e669678e47bf7097aae (patch)
treeddeab0659e797dcfa2866d9c9941e52d9a4f2583
parent1ea5a7bcdd4c48a0d060d80dea0a828de547a181 (diff)
experimental install script
-rwxr-xr-xconfig20
1 files 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