feat: dockerfile
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal 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"]
|
||||
Reference in New Issue
Block a user