From 45a6424ccca9e1adf7ee4bff3a046f3ffedb4d11 Mon Sep 17 00:00:00 2001 From: jonny <475634114@qq.com> Date: Sun, 22 May 2022 17:03:29 +0800 Subject: [PATCH] Create start.sh --- docker/start.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docker/start.sh diff --git a/docker/start.sh b/docker/start.sh new file mode 100644 index 00000000..60c3e2f2 --- /dev/null +++ b/docker/start.sh @@ -0,0 +1,14 @@ +#!/bin/sh +### Author:jonnyan404 +### date:2022年5月22日 +CONFIG_FILE='/app/config/prod.yaml' + +if [ ! -f $CONFIG_FILE ]; then + echo "#####Generating configuration file#####" + cp /app/docker/prod-sample.yaml $CONFIG_FILE +else + echo "#####Configuration file already exists#####" +fi +redis-server --daemonize yes +pnpm run pm2 +pm2 logs