Skip to content

Commit

Permalink
formatting only
Browse files Browse the repository at this point in the history
  • Loading branch information
pascalandy committed Nov 21, 2018
1 parent c1ab643 commit 052d2d7
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# Author: Pascal Andy | pascalandy.com/blog/now/
#
# Forked from https://github.com/docker-library/ghost/blob/2f6ac6c7770e428a4a50d23d46ec470d5e727456/1/alpine/Dockerfile
# https://docs.ghost.org/supported-node-versions/
# https://github.com/nodejs/LTS | FROM node:8.12.0-alpine | devmtl/node-alpine:8.11.4
# https://docs.ghost.org/supported-node-versions/ | https://github.com/nodejs/LTS
#
# VAR TO UPDATE -> lines: 8, 12, 13
#
# VAR TO UPDATE -> see lines: 8, 12, 13

FROM node:10.13.0-alpine

LABEL maintainer="Pascal Andy | pascalandy.com/blog/now"
LABEL maintainer="Pascal Andy | https://pascalandy.com/"

ENV GHOST_VERSION="2.6.1" \
GHOST_CLI_VERSION="1.9.8" \
Expand All @@ -27,10 +27,10 @@ RUN set -ex && \
mkdir -p "$GHOST_INSTALL"; \
chown node:node "$GHOST_INSTALL"; \
\
# Install Ghost / optional: --verbose
# install Ghost / optional: --verbose
su-exec node ghost install "$GHOST_VERSION" --db sqlite3 --no-prompt --no-stack --no-setup --dir "$GHOST_INSTALL"; \
\
# Tell Ghost to listen on all ips and not prompt for additional configuration
# tell Ghost to listen on all ips and not prompt for additional configuration
cd "$GHOST_INSTALL"; \
su-exec node ghost config --ip 0.0.0.0 --port 2368 --no-prompt --db sqlite3 --url http://localhost:2368 --dbpath "$GHOST_CONTENT/data/ghost.db"; \
su-exec node ghost config paths.contentPath "$GHOST_CONTENT"; \
Expand All @@ -47,23 +47,21 @@ RUN set -ex && \
# sanity check to ensure knex-migrator was installed
"$GHOST_INSTALL/current/node_modules/knex-migrator/bin/knex-migrator" --version \
\
# uninstall ghost-cli
# uninstall ghost-cli / Let's save a few bytes
su-exec node npm uninstall -S -D -O -g "ghost-cli@$GHOST_CLI_VERSION";

# add knex-migrator bins into PATH
# we want these from the context of Ghost's "node_modules" directory (instead of doing "npm install -g knex-migrator") so they can share the DB driver modules
ENV PATH $PATH:$GHOST_INSTALL/current/node_modules/knex-migrator/bin

# TODO multiarch sqlite3 (once either "node:6-alpine" has multiarch or we switch to a base that does)

WORKDIR $GHOST_INSTALL
VOLUME $GHOST_CONTENT
EXPOSE 2368

COPY docker-entrypoint.sh /usr/local/bin
ENTRYPOINT [ "/sbin/tini", "--", "docker-entrypoint.sh" ]

EXPOSE 2368
ENTRYPOINT [ "/sbin/tini", "--", "docker-entrypoint.sh" ]

# Healthcheck setting are made during docker service create (...)
# Healthcheck, attributes are passed when > docker service create

CMD ["node", "current/index.js"]

0 comments on commit 052d2d7

Please sign in to comment.