Skip to content

Commit

Permalink
More fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fletchto99 authored Nov 22, 2022
1 parent 55b38b2 commit d556f8d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 18 deletions.
6 changes: 0 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,5 @@ FROM node:19

COPY setup /setup

# Install requirements
RUN (cd /setup; sh bootstrap.sh)

# Set the work directory to blog
WORKDIR /config

# Start the server
CMD ["/bin/bash", "/setup/run.sh"]
8 changes: 0 additions & 8 deletions setup/bootstrap.sh

This file was deleted.

16 changes: 12 additions & 4 deletions setup/run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/bash

# Used to install rsync for deployments
echo "Installing rsync for deployments"
apt-get update -y
apt-get -y install rsync

# Install HEXO
echo "Installing hexo.."
npm install -g hexo

# Check to ensure the /config volume is mounted
if [ ! -d "/config" ]; then
echo "Please mount a /config directory so you blog persists upon container restarts!"
Expand All @@ -20,13 +29,12 @@ if [[ -z "${HEXO_PLUGINS}" ]]; then
echo "No additional plugins to install!"
else
echo "Installing additional plugins \"${HEXO_PLUGINS}\""
npm install "${HEXO_PLUGINS}"
npm install -C /config ${HEXO_PLUGINS}
fi

# Start the server
echo "Starting hexo server on port 8080"

# Start fresh
cd /config || exit 1
hexo clean || true
hexo server -p 8080 --debug --draft
hexo clean --cwd /config
hexo server --cwd /config -p 8080 --debug --draft

0 comments on commit d556f8d

Please sign in to comment.