adicionado Dockerfile e .dockerignore para conteineirização
This commit is contained in:
parent
8ffe367d88
commit
cecc38b26e
4 changed files with 49 additions and 8 deletions
17
.dockerignore
Normal file
17
.dockerignore
Normal 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
31
Dockerfile
Normal 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"]
|
||||
|
|
@ -25,14 +25,6 @@ export default defineNuxtConfig({
|
|||
colorMode: false,
|
||||
},
|
||||
|
||||
// deploy cloudflare
|
||||
nitro: {
|
||||
preset: "cloudflare-pages",
|
||||
prerender: {
|
||||
autoSubfolderIndex: false,
|
||||
},
|
||||
},
|
||||
|
||||
umami: {
|
||||
id: "fd7501ea-3aa8-4ef5-ae8f-3b2c0e6544e4",
|
||||
host: "https://umami.estudioaany.com.br/",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
{
|
||||
"name": "estudioaany-site",
|
||||
"version": "1.0.0",
|
||||
"type": "module",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue