mirror of
https://github.com/mxpv/podsync.git
synced 2024-05-11 05:55:04 +00:00
Fix frontend build
This commit is contained in:
15
Dockerfile
15
Dockerfile
@@ -1,13 +1,12 @@
|
||||
FROM node:latest AS gulp
|
||||
FROM node:8-slim AS frontend_builder
|
||||
WORKDIR /app
|
||||
COPY . .
|
||||
RUN npm install
|
||||
RUN npm link gulp
|
||||
RUN gulp patch
|
||||
RUN npm run build
|
||||
|
||||
FROM golang:1.11.2 AS build
|
||||
FROM golang:1.11.2 AS backend_builder
|
||||
WORKDIR /podsync
|
||||
COPY --from=gulp /app .
|
||||
COPY --from=frontend_builder /app .
|
||||
ENV GOOS=linux
|
||||
ENV GOARCH=amd64
|
||||
ENV CGO_ENABLED=0
|
||||
@@ -16,9 +15,9 @@ RUN go build -o server -v ./cmd/app
|
||||
FROM alpine
|
||||
RUN apk --update --no-cache add ca-certificates
|
||||
WORKDIR /app/
|
||||
COPY --from=gulp /app/templates ./templates
|
||||
COPY --from=gulp /app/dist ./assets
|
||||
COPY --from=build /podsync/server .
|
||||
COPY --from=frontend_builder /app/templates ./templates
|
||||
COPY --from=frontend_builder /app/dist ./assets
|
||||
COPY --from=backend_builder /podsync/server .
|
||||
ENV ASSETS_PATH /app/assets
|
||||
ENV TEMPLATES_PATH /app/templates
|
||||
ENTRYPOINT ["/app/server"]
|
||||
@@ -17,6 +17,7 @@
|
||||
"gulp-uglify": "^3.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"build": "gulp -v && gulp patch",
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
|
||||
Reference in New Issue
Block a user