Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ RUN \
cd /ghost && \
npm install --production && \
sed 's/127.0.0.1/0.0.0.0/' /ghost/config.example.js > /ghost/config.js && \
useradd ghost --home /ghost
mkdir /ghost-override && \
useradd ghost --home /ghost && \
chown -R ghost:ghost /ghost /ghost-override /data

# Add files.
ADD start.bash /ghost-start
Expand All @@ -33,5 +35,8 @@ WORKDIR /ghost
# Define default command.
CMD ["bash", "/ghost-start"]

# Run as ghost
USER ghost

# Expose ports.
EXPOSE 2368
6 changes: 0 additions & 6 deletions start.bash
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ DATA="content/data"
IMAGES="content/images"
THEMES="content/themes"

cd "$GHOST"

# Symlink data directory.
mkdir -p "$OVERRIDE/$DATA"
rm -fr "$DATA"
Expand All @@ -36,8 +34,4 @@ if [[ -d "$OVERRIDE/$THEMES" ]]; then
fi

# Start Ghost
chown -R ghost:ghost /data /ghost /ghost-override
su ghost << EOF
cd "$GHOST"
NODE_ENV=${NODE_ENV:-production} npm start
EOF