2023-08-31 19:21:36 +02:00
|
|
|
FROM golang:1.19 AS build
|
2020-04-20 12:24:17 +02:00
|
|
|
|
2020-05-03 19:19:28 +02:00
|
|
|
ARG HTTP_PROXY=
|
|
|
|
ARG HTTPS_PROXY=
|
|
|
|
ARG http_proxy=
|
|
|
|
ARG https_proxy=
|
2023-09-01 03:46:43 +02:00
|
|
|
ARG NODE_MAJOR=16
|
2020-05-03 19:19:28 +02:00
|
|
|
|
2023-09-01 03:46:43 +02:00
|
|
|
RUN apt-get update && apt-get install -y build-essential git bash curl ca-certificates gnupg
|
2020-05-03 19:19:28 +02:00
|
|
|
|
2023-09-01 03:46:43 +02:00
|
|
|
RUN echo 'Package: nodejs\nPin: origin deb.nodesource.com\nPin-Priority: 600' > /etc/apt/preferences.d/nodesource \
|
|
|
|
&& mkdir -p /etc/apt/keyrings \
|
|
|
|
&& curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg \
|
|
|
|
&& echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list \
|
|
|
|
&& apt-get update \
|
2020-05-03 19:19:28 +02:00
|
|
|
&& apt-get install -y nodejs
|
2020-04-22 22:07:52 +02:00
|
|
|
|
2020-04-20 12:24:17 +02:00
|
|
|
COPY . /src
|
|
|
|
|
2020-05-03 19:19:28 +02:00
|
|
|
WORKDIR /src
|
2020-04-20 12:24:17 +02:00
|
|
|
|
2023-09-01 03:46:43 +02:00
|
|
|
RUN make deps \
|
2020-05-03 19:19:28 +02:00
|
|
|
&& make ARCH_TARGETS=amd64 release
|
2020-04-20 12:24:17 +02:00
|
|
|
|
2020-05-03 19:19:28 +02:00
|
|
|
FROM busybox
|
2020-04-20 12:24:17 +02:00
|
|
|
|
2020-05-03 19:19:28 +02:00
|
|
|
COPY --from=build /src/release/server-linux-amd64 /app
|
2020-04-20 12:24:17 +02:00
|
|
|
|
2020-05-03 19:19:28 +02:00
|
|
|
WORKDIR /app
|
2020-04-20 12:24:17 +02:00
|
|
|
|
2020-04-27 22:43:42 +02:00
|
|
|
COPY misc/dokku/CHECKS /client/CHECKS
|
2020-04-20 12:24:17 +02:00
|
|
|
|
|
|
|
EXPOSE 80
|
|
|
|
|
2020-05-03 19:19:28 +02:00
|
|
|
VOLUME /data
|
|
|
|
|
|
|
|
ENV GUESSTIMATE_HTTP_ADDRESS=:80
|
|
|
|
ENV GUESSTIMATE_HTTP_PUBLIC_DIR=/app/public
|
|
|
|
ENV GUESSTIMATE_DATA_PATH=/data/guesstimate.db
|
|
|
|
|
|
|
|
CMD ["/app/bin/server", "-config", "config.yml"]
|