🌱🏠 a cloud service to enable your own server (owned by you and running on your computer) to be accessible on the internet in seconds, no credit card required https://greenhouse.server.garden/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.8 KiB

FROM golang:1.15.2-alpine as build
ARG GOARCH=
ARG GO_BUILD_ARGS=
RUN mkdir /build
WORKDIR /build
COPY pki/go.mod pki/go.sum ./pki/
COPY go.mod go.sum ./
RUN go mod download
COPY pki ./pki
COPY *.go ./
RUN go build -v $GO_BUILD_ARGS -o /build/greenhouse .
FROM alpine
WORKDIR /greenhouse
RUN apk add --no-cache openssh-client
COPY --from=build /build/greenhouse /greenhouse/greenhouse
# for now I think this will be set up manually.
# RUN mkdir -p /greenhouse/greenhouse-daemon && \
# curl -sS -o "daemon.gz" "https://picopublish.sequentialread.com/files/greenhouse-daemon-alpha-rc0-315e67e-82d8-linux-$GOARCH.gz" && \
# gzip --stdout --decompress "daemon.gz" > "/greenhouse/greenhouse-daemon/greenhouse-daemon" && \
# rm "daemon.gz" && chmod +x "/greenhouse/greenhouse-daemon/greenhouse-daemon" && \
# curl -sS -o "threshold.gz" "https://picopublish.sequentialread.com/files/threshold-0.0.0-6cfcabd-f27e-linux-$GOARCH.gz" && \
# gzip --stdout --decompress "threshold.gz" > "/greenhouse/greenhouse-daemon/greenhouse-threshold" && \
# rm "threshold.gz" && chmod +x "/greenhouse/greenhouse-daemon/greenhouse-threshold" && \
# curl -sS -o "caddy.gz" "https://picopublish.sequentialread.com/files/caddy-v2.4.0-beta.2-forest-078f12e0-b4a8-linux-$GOARCH.gz" && \
# gzip --stdout --decompress "caddy.gz" > "/greenhouse/greenhouse-daemon/greenhouse-caddy" && \
# rm "caddy.gz" && chmod +x "/greenhouse/greenhouse-daemon/greenhouse-caddy" && \
# echo '{
# "admin": {
# "disabled": false,
# "listen": "unix///var/run/greenhouse-daemon-caddy-admin.sock",
# "config": {
# "persist": false
# }
# }
# }' > /greenhouse/greenhouse-daemon/caddy-config.json
COPY ./example_config.json /greenhouse/config.json
COPY ./frontend /greenhouse/frontend
COPY ./schema_versions /greenhouse/schema_versions
ENTRYPOINT ["/greenhouse/greenhouse"]