docs(obsidian): vault pulse sync — 5 notas (Home, pulse-3d-landing, pulse-dev, design-tokens, pulse-libs)
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
---
|
||||
title: "pulse-3d-landing — Docker + Deploy"
|
||||
created: 2026-05-20
|
||||
tags: [docker, deploy, threejs, vite]
|
||||
---
|
||||
|
||||
# 🐳 pulse-3d-landing — Docker Stack
|
||||
|
||||
## Local Dev
|
||||
```bash
|
||||
npm run dev # Vite dev server :5173
|
||||
```
|
||||
|
||||
## Build production
|
||||
```bash
|
||||
npm run build # → dist/
|
||||
npm run preview # preview estático
|
||||
```
|
||||
|
||||
## Dockerfile (multi-stage)
|
||||
```dockerfile
|
||||
# Stage 1: build
|
||||
FROM node:24-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY package*.json ./
|
||||
RUN npm ci --only=production 2>/dev/null; npm install
|
||||
COPY . .
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: produção
|
||||
FROM nginx:alpine
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
EXPOSE 80
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
```
|
||||
|
||||
## Deploy no Swarm
|
||||
```bash
|
||||
docker build -t pulse-3d-landing:v1 .
|
||||
docker tag pulse-3d-landing:v1 registry.octal.tec.br/pulse/pulse-3d-landing:v1
|
||||
docker push registry.octal.tec.br/pulse/pulse-3d-landing:v1
|
||||
|
||||
# Adicionar ao compose da stack project ou criar stack separada
|
||||
docker stack deploy -c runbooks/3d-landing-stack.yml web3d
|
||||
```
|
||||
Reference in New Issue
Block a user