Adicionar Dockerfile e podman-compose
This commit is contained in:
parent
77f806038c
commit
d1e21c8da9
4 changed files with 35 additions and 2 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Usar uma imagem oficial do Node.js
|
||||||
|
FROM node:18-alpine
|
||||||
|
|
||||||
|
# Definir diretório de trabalho
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copiar arquivos do projeto
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Instalar dependências
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Expor a porta do Vite
|
||||||
|
EXPOSE 5173
|
||||||
|
|
||||||
|
# Rodar o servidor de desenvolvimento do Vite
|
||||||
|
CMD ["npm", "run", "dev"]
|
||||||
|
|
@ -4,10 +4,10 @@
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite --host 0.0.0.0",
|
||||||
"build": "tsc -b && vite build",
|
"build": "tsc -b && vite build",
|
||||||
"lint": "eslint .",
|
"lint": "eslint .",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview --host 0.0.0.0",
|
||||||
"format": "prettier --write ."
|
"format": "prettier --write ."
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
|
|
||||||
12
podman-compose.yml
Normal file
12
podman-compose.yml
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
version: "3.8"
|
||||||
|
|
||||||
|
services:
|
||||||
|
app:
|
||||||
|
container_name: portal-app
|
||||||
|
image: localhost/portal:v2
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "5173:5173"
|
||||||
|
restart: always
|
||||||
|
netork_mode: host
|
||||||
|
|
||||||
|
|
@ -3,5 +3,9 @@ import react from '@vitejs/plugin-react'
|
||||||
|
|
||||||
// https://vite.dev/config/
|
// https://vite.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
|
server: {
|
||||||
|
host: "0.0.0.0",
|
||||||
|
port: 5173
|
||||||
|
},
|
||||||
plugins: [react()],
|
plugins: [react()],
|
||||||
})
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue