Add Dockerfile

main
trivernis 3 months ago
parent 5f17c0451c
commit 68edde56dd
Signed by: Trivernis
GPG Key ID: 7E6D18B61C8D2F4B

@ -0,0 +1,10 @@
.git
node_modules
.eslint*
.prettier*
.git*
.vscode
Containerfile*
public
.svelte-kit
build

@ -0,0 +1,20 @@
FROM docker.io/node:20.15.0-alpine AS builder
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
COPY . .
RUN npm run build
FROM docker.io/node:20.5.0-alpine
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci --omit dev
COPY --from=builder /app/build /app
EXPOSE 3000
CMD ["node", "."]

@ -19,7 +19,7 @@
<figure>
<picture>
{#each imageData.formats as format}
<source media={format.width? `(min-width: ${format.width * 2}px)` : "(min-width: 0px)"} type={format.mime} srcset={format.url} />
<source media={format.width? `(min-width: ${format.width}px)` : "(min-width: 0px)"} type={format.mime} srcset={format.url} />
{/each}
<img src={imageData.formats[0]?.url} {alt} />
</picture>

Loading…
Cancel
Save