Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Ignorar node_modules local para evitar conflitos
node_modules
.yarn
.pnp
.pnp.js

# Ignorar arquivos de configuração locais
.env
.env.*
!.env.production # Permitir a versão de produção, se existir

# Ignorar diretórios de build e cache
dist
.cache
.vite
.output

# Ignorar arquivos do Git
.git
.gitignore

# Ignorar logs e arquivos do sistema
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
.DS_Store
Thumbs.db

# Ignorar arquivos de config
Dockerfile
docker-compose.*
/*/**/*.md
14 changes: 14 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM node:20-alpine AS build
WORKDIR /app
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build

FROM nginx:alpine
RUN apk add --no-cache bash
RUN rm -rf /usr/share/nginx/html/*
COPY --from=build /app/dist /usr/share/nginx/html
COPY nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
13 changes: 13 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
services:
web:
image: website
build:
context: .
dockerfile: ./Dockerfile
stdin_open: true
tty: true
volumes:
- .:/app:rw
ports:
- "8080:8080"
network_mode: "host"
11 changes: 11 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
server {
listen 8080;
server_name _;

root /usr/share/nginx/html;
index index.html;

location / {
try_files $uri /index.html;
}
}
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"name": "me",
"private": true,
"version": "0.0.0",
"version": "0.1.0",
"type": "module",
"engines": {
"node": ">=20"
},
"scripts": {
"dev": "vite --host",
"build": "vite build",
Expand Down