Skip to content
This repository has been archived by the owner on Mar 19, 2021. It is now read-only.

Commit

Permalink
fix(docker): migrations source
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeysova committed Sep 29, 2019
1 parent 95c027d commit 3fd4cb2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,15 @@ RUN seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{} && \
touch .env

WORKDIR /app

COPY --from=build /out/diesel /bin/
COPY --from=build /app/target/release/howtocards_server ./
COPY --from=build /app/migrations ./

COPY --from=build /app/src ./src
COPY --from=build /app/migrations ./migrations
COPY --from=build /app/diesel.toml ./
COPY docker-entrypoint.sh ./entrypoint.sh

RUN chmod +x entrypoint.sh && chmod +x howtocards_server

ENTRYPOINT ["/app/entrypoint.sh"]
Expand Down
2 changes: 1 addition & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ until PGPASSWORD=${POSTGRES_PASSWORD} psql -h ${DATABASE_HOST} -U ${POSTGRES_USE
done

>&2 echo "Postgres is up - executing command"
diesel migration run && exec $@
cd /app && ls . && diesel migration run && exec $@

0 comments on commit 3fd4cb2

Please sign in to comment.