Add Haskell MVP BFF with mutation protocol and local compose stack.
This commit is contained in:
parent
5759938f3f
commit
6bc08bd7bf
1 changed files with 3123 additions and 3 deletions
53
Dockerfile
Normal file
53
Dockerfile
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
FROM haskell:9.10.3-slim-bookworm AS build
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libpq-dev \
|
||||
pkg-config \
|
||||
zlib1g-dev \
|
||||
ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /src
|
||||
|
||||
COPY nuthatch.cabal cabal.project ./
|
||||
RUN cabal update \
|
||||
&& cabal build --only-dependencies all
|
||||
|
||||
COPY sql ./sql
|
||||
COPY app ./app
|
||||
COPY src ./src
|
||||
COPY test ./test
|
||||
|
||||
RUN cabal build exe:nuthatch \
|
||||
&& mkdir -p /out \
|
||||
&& cp "$(cabal list-bin exe:nuthatch)" /out/nuthatch
|
||||
|
||||
FROM debian:bookworm-slim AS runtime
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
libpq5 \
|
||||
ca-certificates \
|
||||
curl \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
COPY --from=build /out/nuthatch /usr/local/bin/nuthatch
|
||||
COPY sql ./sql
|
||||
|
||||
ENV NUTHATCH_LISTEN=0.0.0.0:8080 \
|
||||
NUTHATCH_PUBLIC_BASE_URL=http://127.0.0.1:8080 \
|
||||
NUTHATCH_JWT_SECRET=dev-only-change-me-to-a-long-random-string \
|
||||
NUTHATCH_PG_CONN="host=postgres port=5432 user=nuthatch password=nuthatch dbname=nuthatch" \
|
||||
NUTHATCH_REDIS_URL=redis://redis:6379/0 \
|
||||
NUTHATCH_S3_ENDPOINT=http://minio:9000 \
|
||||
NUTHATCH_S3_REGION=us-east-1 \
|
||||
NUTHATCH_S3_BUCKET=nuthatch \
|
||||
NUTHATCH_S3_ACCESS_KEY=minioadmin \
|
||||
NUTHATCH_S3_SECRET_KEY=minioadmin \
|
||||
NUTHATCH_S3_PATH_STYLE=true \
|
||||
NUTHATCH_AUTH_MODE=dev
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["nuthatch"]
|
||||
Loading…
Reference in a new issue