Skip to content

Adjust knex-migrator to be in the PATH directly instead of symlinking #105

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 14, 2017
Merged
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
10 changes: 5 additions & 5 deletions 1/alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ RUN set -ex; \
mkdir -p "$GHOST_CONTENT"; \
chown node:node "$GHOST_CONTENT"; \
\
# symlink knex-migrator bins into PATH
# sanity check to ensure knex-migrator was installed
"$GHOST_INSTALL/current/node_modules/knex-migrator/bin/knex-migrator" --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
for f in "$GHOST_INSTALL/current/node_modules/.bin/knex-migrator"*; do \
[ -x "$f" ]; \
ln -svf "$f" /usr/local/bin/; \
done
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)

Expand Down
10 changes: 5 additions & 5 deletions 1/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ RUN set -ex; \
mkdir -p "$GHOST_CONTENT"; \
chown node:node "$GHOST_CONTENT"; \
\
# symlink knex-migrator bins into PATH
# sanity check to ensure knex-migrator was installed
"$GHOST_INSTALL/current/node_modules/knex-migrator/bin/knex-migrator" --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
for f in "$GHOST_INSTALL/current/node_modules/.bin/knex-migrator"*; do \
[ -x "$f" ]; \
ln -svf "$f" /usr/local/bin/; \
done
ENV PATH $PATH:$GHOST_INSTALL/current/node_modules/knex-migrator/bin

RUN set -eux; \
# force install "sqlite3" manually since it's an optional dependency of "ghost"
Expand Down