This repository has been archived by the owner on Oct 8, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
FROM node:lts AS builder | ||
|
||
WORKDIR /app | ||
COPY . /app | ||
|
||
RUN npm i | ||
RUN npm run build | ||
RUN rm -Rf ./.github \ | ||
./assets \ | ||
./components \ | ||
./docs \ | ||
./layouts \ | ||
./pages \ | ||
./node_modules | ||
|
||
FROM node:lts-alpine | ||
|
||
ENV TZ Asia/Bangkok | ||
ENV NODE_ENV production | ||
|
||
WORKDIR /app | ||
COPY --from=builder /app . | ||
RUN npm i | ||
|
||
CMD ["npm", "start"] | ||
|
||
# FROM golang:1.7.3 AS builder | ||
# WORKDIR /go/src/github.com/alexellis/href-counter/ | ||
# RUN go get -d -v golang.org/x/net/html | ||
# COPY app.go . | ||
# RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app . |