adicionado Dockerfile e .dockerignore para conteineirização

This commit is contained in:
Yago Veloso 2026-05-11 16:10:56 -03:00
parent 8ffe367d88
commit cecc38b26e
Signed by: yago
SSH key fingerprint: SHA256:IZDFL45EiQHkuvA0PXILibmHcrh7x7A3K+HN/za7KLU
4 changed files with 49 additions and 8 deletions

17
.dockerignore Normal file
View file

@ -0,0 +1,17 @@
node_modules
.git
.nuxt
.output
.data
.nitro
.cache
dist
.wrangler
.wrangler-deploy
.DS_Store
*.log
.env
.env.*
!.env.example
.idea
.fleet

31
Dockerfile Normal file
View file

@ -0,0 +1,31 @@
# Stage 1: Build
FROM node:22-alpine AS builder
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable && corepack prepare pnpm@latest --activate
WORKDIR /app
COPY package.json pnpm-lock.yaml pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
COPY . .
ENV NITRO_PRESET=node-server
RUN pnpm build
# Stage 2: Runner
FROM node:22-alpine AS runner
WORKDIR /app
COPY --from=builder /app/.output ./.output
ENV HOST=0.0.0.0
ENV PORT=3000
EXPOSE 3000
CMD ["node", ".output/server/index.mjs"]

View file

@ -25,14 +25,6 @@ export default defineNuxtConfig({
colorMode: false, colorMode: false,
}, },
// deploy cloudflare
nitro: {
preset: "cloudflare-pages",
prerender: {
autoSubfolderIndex: false,
},
},
umami: { umami: {
id: "fd7501ea-3aa8-4ef5-ae8f-3b2c0e6544e4", id: "fd7501ea-3aa8-4ef5-ae8f-3b2c0e6544e4",
host: "https://umami.estudioaany.com.br/", host: "https://umami.estudioaany.com.br/",

View file

@ -1,5 +1,6 @@
{ {
"name": "estudioaany-site", "name": "estudioaany-site",
"version": "1.0.0",
"type": "module", "type": "module",
"private": true, "private": true,
"scripts": { "scripts": {