Skip to content

Commit

Permalink
ci: add Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
KoltesDigital committed Oct 4, 2024
1 parent e240386 commit d456800
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
public
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM node:22-alpine AS builder
WORKDIR /app
ADD . /app
RUN npm ci --legacy-peer-deps && \
npm run build

FROM pierrezemb/gostatic
COPY headerConfig.json /config/
COPY --from=builder /app/public /srv/http
18 changes: 18 additions & 0 deletions headerConfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"configs": [
{
"path": "*",
"fileExtension": "*",
"headers": [
{
"key": "Cache-Control",
"value": "public, max-age=30, must-revalidate"
},
{
"key": "Strict-Transport-Security",
"value": "max-age=31536000; includeSubDomains;"
}
]
}
]
}

0 comments on commit d456800

Please sign in to comment.