feat: dockerfile

This commit is contained in:
2026-03-01 12:57:30 +01:00
parent 2ecfda256b
commit 31da68b6c1

22
Dockerfile Normal file
View File

@@ -0,0 +1,22 @@
FROM ghcr.io/gleam-lang/gleam:v1.14.0-erlang-alpine
RUN apk add --no-cache elixir git libstdc++ openssl
WORKDIR /app
COPY gleam.toml manifest.toml ./
COPY src/ ./src/
RUN gleam deps download && gleam build --target erlang
RUN adduser -D -H spasteg && chown -R spasteg:spasteg /app
ENV PORT=3000
EXPOSE 3000
USER spasteg
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD wget --no-verbose --tries=1 --spider http://localhost:3000/ || exit 1
ENTRYPOINT ["gleam", "run", "--target", "erlang", "--", "--no-halt"]