Skip to content

Commit bdd8920

Browse files
committed
entrypoint.sh
1 parent 85d0840 commit bdd8920

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,12 +96,14 @@ ENV MIX_ENV="prod"
9696

9797
# Only copy the final release from the build stage
9898
COPY --from=builder --chown=nobody:root /app/_build/${MIX_ENV}/rel/mudan ./
99+
COPY --chown=nobody:root entrypoint.sh /app/entrypoint.sh
100+
RUN chmod +x /app/entrypoint.sh
99101

100102
USER nobody
101103

102104
# If using an environment that doesn't automatically reap zombie processes, it is
103105
# advised to add an init process such as tini via `apt-get install`
104106
# above and adding an entrypoint. See https://github.com/krallin/tini for details
105107
# ENTRYPOINT ["/tini", "--"]
106-
108+
ENTRYPOINT ["/app/entrypoint.sh"]
107109
CMD ["/app/bin/server"]

entrypoint.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/sh
2+
set -e
3+
4+
/app/bin/mundan eval "Mudan.Release.migrate()"
5+
6+
exec "$@"

0 commit comments

Comments
 (0)