Create start.sh

This commit is contained in:
jonny 2022-05-22 17:03:29 +08:00 committed by GitHub
parent 4f7989296c
commit 45a6424ccc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 14 additions and 0 deletions

14
docker/start.sh Normal file
View File

@ -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