horsepaste/Dockerfile
joshii 0046177494
Some checks are pending
Build horsepaste / build (push) Waiting to run
Initial commit
2026-03-15 13:36:37 +01:00

24 lines
571 B
Docker

# Build backend.
FROM golang:1.14-alpine as backend
WORKDIR /app
COPY . .
RUN apk add gcc musl-dev \
&& go build ./cmd/horsepaste/main.go
# Build frontend.
FROM node:12-alpine as frontend
COPY . /app
WORKDIR /app/frontend
RUN npm install -g parcel-bundler \
&& npm install \
&& sh build.sh
# Copy build artifacts from previous build stages (to remove files not necessary for
# deployment).
FROM alpine:3.11
WORKDIR /app
COPY --from=backend /app/main .
COPY --from=frontend /app/frontend/dist ./frontend/dist
COPY assets assets
EXPOSE 9091/tcp
CMD /app/main