-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (24 loc) · 698 Bytes
/
Dockerfile
File metadata and controls
41 lines (24 loc) · 698 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# builder
FROM fpco/stack-build-small:lts-21.25 as base
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install libpq-dev -y
WORKDIR /app
COPY stack.yaml .
COPY package.yaml .
RUN stack build --only-dependencies
FROM base as builder
WORKDIR /app
COPY . .
RUN stack --local-bin-path output install
# runtime container
FROM ubuntu:22.04 as runtime
RUN apt-get update
RUN apt-get install libpq-dev libncurses5 -y
ENV POSTGRES_CONNECT_STRING=host=localhost port=5432 user=postgres password=postgres dbname=conduit connect_timeout=10
ENV POSTGRES_POOL_SIZE=1
ENV JWK_STRING=
WORKDIR /root/
COPY --from=builder /app/output ./
EXPOSE 8080
CMD [ "./conduit-server-exe" ]