we can now build docker containers!

This commit is contained in:
hexlocation's laptop (asiago) 2024-03-29 01:51:46 -04:00
parent 7c89da0baf
commit 81b3cd5d19
3 changed files with 31 additions and 2 deletions

5
scripts/docker_build.sh Executable file
View file

@ -0,0 +1,5 @@
# Disseminate Build Script
# This script builds disseminate into a docker container, using the dockerfile provided in the repository.
cd ..
docker build . -t disseminate:latest

19
scripts/docker_run.sh Executable file
View file

@ -0,0 +1,19 @@
# I'm so bad at bash scripting
if [ -z "$(find posts -mindepth 1 -maxdepth 1)" ]; then
echo '-------------'
echo 'Posts directory is empty, copying default...'
echo '-------------'
cp -r default_posts/* posts
fi
if [ -z "$(find templates -mindepth 1 -maxdepth 1)" ]; then
echo '-------------'
echo 'Template directory is empty, copying default...'
echo '-------------'
cp -r default_templates/* templates
fi
echo 'Starting...'
node index.js
echo 'Exiting...'