mirror of
https://github.com/aykhans/slash-e.git
synced 2025-06-14 11:57:50 +00:00
chore: use pnpm instead of yarn
This commit is contained in:
13
Dockerfile
13
Dockerfile
@ -2,25 +2,30 @@
|
||||
FROM node:18.12.1-alpine3.16 AS frontend
|
||||
WORKDIR /frontend-build
|
||||
|
||||
COPY ./web/package.json ./web/pnpm-lock.yaml ./
|
||||
|
||||
RUN corepack enable && pnpm i --frozen-lockfile
|
||||
|
||||
COPY ./web/ .
|
||||
|
||||
RUN yarn && yarn build
|
||||
RUN pnpm build
|
||||
|
||||
# Build backend exec file.
|
||||
FROM golang:1.19.3-alpine3.16 AS backend
|
||||
WORKDIR /backend-build
|
||||
|
||||
RUN apk update && apk add --no-cache gcc musl-dev
|
||||
|
||||
COPY . .
|
||||
COPY --from=frontend /frontend-build/dist ./server/dist
|
||||
|
||||
RUN go build -o shortify ./main.go
|
||||
RUN CGO_ENABLED=0 go build -o shortify ./main.go
|
||||
|
||||
# Make workspace with above generated files.
|
||||
FROM alpine:3.16 AS monolithic
|
||||
WORKDIR /usr/local/shortify
|
||||
|
||||
RUN apk add --no-cache tzdata
|
||||
ENV TZ="UTC"
|
||||
|
||||
COPY --from=backend /backend-build/shortify /usr/local/shortify/
|
||||
|
||||
# Directory to store the data, which can be referenced as the mounting point.
|
||||
|
Reference in New Issue
Block a user