Deploy glance on Vercel or Netlify or Railway #185
-
is there a way to Deploy glance on Vercel or Netlify, any config required i did try with netlify but facing some go version errors and if I change the version as I get dependencies error. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 21 replies
-
I am not sure vercel supports golang... but one option I have used was, railway.
I dropped my glance instance, but deploying it just now for you to have an example... |
Beta Was this translation helpful? Give feedback.
-
Also checking for vercel... |
Beta Was this translation helpful? Give feedback.
-
My glance instance at https://glance-production.up.railway.app/ FROM golang:1.22-alpine AS builder
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o myapp .
FROM alpine:latest
# Install curl to download glance.yml from repository
RUN apk add --no-cache curl
WORKDIR /app
# update the username and repository names to yours please
RUN curl -o glance.yml https://raw.githubusercontent.com/ken-morel/glance/main/glance.yml
COPY --from=builder /app/myapp /myapp
ENTRYPOINT ["/myapp"] |
Beta Was this translation helpful? Give feedback.
-
@ken-morel
|
Beta Was this translation helpful? Give feedback.
-
Delete the FROM golang:1.22-alpine AS builder
COPY . .
RUN go mod download
RUN go build -o /glance .
ENTRYPOINT ["/glance"] This worked for me. This implies all your assets including glance.yml are present in the repository. |
Beta Was this translation helpful? Give feedback.
-
I'm using glance.yml from Gist FROM golang:1.22.5-alpine
WORKDIR /app
COPY . .
RUN go mod download
RUN go build -o app .
# Install curl to download glance.yml
RUN apk add --no-cache curl
# Download glance.yml from the specified gist
ARG GLANCE_FILE
RUN curl -o glance.yml $GLANCE_FILE
EXPOSE 8080
ENTRYPOINT ["./app"] |
Beta Was this translation helpful? Give feedback.
Delete the
.dockerignore
, and modify the.dockerfile
:This worked for me.
My deployment at https://glance.up.railway.app/ (including custom css)
This implies all your assets including glance.yml are present in the repository.