Created
September 3, 2022 01:05
-
-
Save robertdrakedennis/8165d36e1e252d108075c501574eeb89 to your computer and use it in GitHub Desktop.
Astrojs image for fly.io
This file contains hidden or 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
Dockerfile | |
.dockerignore | |
node_modules | |
npm-debug.log | |
README.md | |
.git | |
dist |
This file contains hidden or 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
# Install dependencies only when needed | |
FROM node:16-alpine AS builder | |
# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. | |
RUN apk add --no-cache libc6-compat | |
COPY . . | |
RUN npm install --frozen-lockfile | |
RUN npm run build | |
FROM pierrezemb/gostatic AS runner | |
COPY --from=builder /dist /srv/http | |
CMD ["-port","8080","-https-promote", "-enable-logging"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment