guesstimate/Dockerfile

37 lines
720 B
Docker
Raw Normal View History

2023-08-31 19:21:36 +02:00
FROM golang:1.19 AS build
2020-04-20 12:24:17 +02:00
ARG HTTP_PROXY=
ARG HTTPS_PROXY=
ARG http_proxy=
ARG https_proxy=
RUN apt-get update && apt-get install -y build-essential git bash curl
2023-08-31 19:21:36 +02:00
RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get install -y nodejs
2020-04-22 22:07:52 +02:00
2020-04-20 12:24:17 +02:00
COPY . /src
WORKDIR /src
2020-04-20 12:24:17 +02:00
2023-08-31 19:21:36 +02:00
RUN ( cd client && npm ci ) \
&& ( cd server && go mod vendor ) \
&& make ARCH_TARGETS=amd64 release
2020-04-20 12:24:17 +02:00
FROM busybox
2020-04-20 12:24:17 +02:00
COPY --from=build /src/release/server-linux-amd64 /app
2020-04-20 12:24:17 +02:00
WORKDIR /app
2020-04-20 12:24:17 +02:00
COPY misc/dokku/CHECKS /client/CHECKS
2020-04-20 12:24:17 +02:00
EXPOSE 80
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"]