-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
262 additions
and
238 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,48 @@ | ||
FROM debian:stable-slim | ||
FROM haskell:9.4.7-slim as builder | ||
|
||
ARG POSTGRES_WEBSOCKETS_VERSION | ||
# Postgres-websockets repo metadata | ||
ARG GIT_REPO=https://github.com/diogob/postgres-websockets.git | ||
ARG GIT_TAG=0.11.2.1 | ||
|
||
# Install System Dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y libpq-dev wget \ | ||
&& apt-get install -y \ | ||
libpq-dev \ | ||
wget \ | ||
git \ | ||
build-essential \ | ||
libffi-dev \ | ||
libgmp-dev \ | ||
zlib1g-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN wget https://github.com/diogob/postgres-websockets/releases/download/$POSTGRES_WEBSOCKETS_VERSION/postgres-websockets | ||
# Clone the Repository | ||
WORKDIR /app | ||
RUN git clone \ | ||
$GIT_REPO \ | ||
--branch $GIT_TAG \ | ||
--depth 1 | ||
|
||
RUN chmod u+x ./postgres-websockets | ||
# Build the Project from source using the resolver it specifies | ||
# https://github.com/diogob/postgres-websockets/tree/master#building-from-source | ||
# https://github.com/diogob/postgres-websockets/blob/master/stack.yaml | ||
WORKDIR /app/postgres-websockets | ||
RUN stack setup | ||
RUN stack install --resolver lts-21.14 | ||
|
||
ENTRYPOINT ["./postgres-websockets"] | ||
# Lightweight Final Image | ||
FROM debian:bullseye-slim | ||
|
||
# Install Runtime Dependencies | ||
RUN apt-get update \ | ||
&& apt-get install -y \ | ||
libpq-dev \ | ||
libgmp-dev \ | ||
zlib1g-dev \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Copy the Binary from the Builder | ||
COPY --from=builder /root/.local/bin/postgres-websockets /usr/local/bin/postgres-websockets | ||
|
||
# Set the Entry Point | ||
ENTRYPOINT ["postgres-websockets"] |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.