WOHOO actual dev scripts now
This commit is contained in:
parent
afdf62b7cb
commit
6e82e1fbe8
18 changed files with 634 additions and 763 deletions
|
@ -1,5 +1,4 @@
|
|||
# Disseminate Build Script
|
||||
# This script builds disseminate into a docker container, using the dockerfile provided in the repository.
|
||||
|
||||
cd ..
|
||||
docker build . -t disseminate:latest
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# I'm so bad at bash scripting
|
||||
cat << EOF
|
||||
|
||||
____ ______________ __
|
||||
/ __ \/ _/ ___/ ___// /
|
||||
/ / / // / \__ \\__ \/ /
|
||||
|
@ -14,27 +13,15 @@ if [ ! -d data ]; then
|
|||
echo '-------------'
|
||||
exit 1
|
||||
fi
|
||||
if [ ! -f data/config.json ]; then
|
||||
if [ -z "$(find data -mindepth 1 -maxdepth 1)" ]; then
|
||||
echo '-------------'
|
||||
echo 'Config file not found. Please create one.'
|
||||
echo 'Data directory is empty, copying template.'
|
||||
echo '-------------'
|
||||
exit 1
|
||||
fi
|
||||
if [ -z "$(find posts -mindepth 1 -maxdepth 1)" ]; then
|
||||
echo '-------------'
|
||||
echo 'Posts directory is empty, copying default...'
|
||||
echo '-------------'
|
||||
cp -r default_posts/* data/posts
|
||||
fi
|
||||
if [ -z "$(find templates -mindepth 1 -maxdepth 1)" ]; then
|
||||
echo '-------------'
|
||||
echo 'Template directory is empty, copying default...'
|
||||
echo '-------------'
|
||||
cp -r default_templates/* data/templates
|
||||
cp -r data.template/* data/
|
||||
fi
|
||||
|
||||
|
||||
echo 'Starting...'
|
||||
node index.js
|
||||
node src/index.js
|
||||
echo 'Exiting...'
|
||||
|
||||
|
|
5
scripts/docker_test.sh
Executable file
5
scripts/docker_test.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
# Disseminate docker test script
|
||||
|
||||
mkdir ignore
|
||||
cd ignore
|
||||
docker run --rm -it -p 3024:3024 -v ./data:/app/data disseminate:latest
|
6
scripts/docker_test_bash.sh
Executable file
6
scripts/docker_test_bash.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
# Disseminate docker test script
|
||||
|
||||
mkdir ignore
|
||||
cd ignore
|
||||
docker run --rm -it -p 3024:3024 -v ./data:/app/data disseminate:latest /bin/sh
|
||||
rm ignore
|
Reference in a new issue