Skip to content

Commit 6b62e5d

Browse files
committed
ops: improve dockerfile
1 parent fbb936d commit 6b62e5d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

Dockerfile

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ RUN mix release
7171
FROM ${RUNNER_IMAGE} AS final
7272

7373
RUN apt-get update \
74-
&& apt-get install -y --no-install-recommends libstdc++6 openssl libncurses6 locales ca-certificates \
74+
&& apt-get install -y --no-install-recommends libstdc++6 openssl libncurses6 locales ca-certificates curl \
7575
&& rm -rf /var/lib/apt/lists/*
7676

7777
# Set the locale
@@ -98,4 +98,9 @@ USER nobody
9898
# above and adding an entrypoint. See https://github.com/krallin/tini for details
9999
# ENTRYPOINT ["/tini", "--"]
100100

101-
CMD ["/app/bin/server"]
101+
EXPOSE 4000
102+
103+
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
104+
CMD curl -f http://localhost:4000/ || exit 1
105+
106+
CMD ["sh", "-c", "/app/bin/migrate && /app/bin/server"]

0 commit comments

Comments
 (0)