diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000..dc157ff1 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,34 @@ +# Include any files or directories that you don't want to be copied to your +# container here (e.g., local build artifacts, temporary files, etc.). +# +# For more help, visit the .dockerignore file reference guide at +# https://docs.docker.com/go/build-context-dockerignore/ + +**/.classpath +**/.dockerignore +**/.env +**/.git +**/.gitignore +**/.project +**/.settings +**/.toolstarget +**/.vs +**/.vscode +**/.next +**/.cache +**/*.*proj.user +**/*.dbmdl +**/*.jfm +**/charts +**/docker-compose* +**/compose.y*ml +**/Dockerfile* +**/node_modules +**/npm-debug.log +**/obj +**/secrets.dev.yaml +**/values.dev.yaml +**/build +**/dist +LICENSE +README.md diff --git a/.gitignore b/.gitignore index eba74f4c..f7275bbb 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -venv/ \ No newline at end of file +venv/ diff --git a/README.Docker.md b/README.Docker.md new file mode 100644 index 00000000..8300f21d --- /dev/null +++ b/README.Docker.md @@ -0,0 +1,22 @@ +### Building and running your application + +When you're ready, start your application by running: +`docker compose up --build`. + +Your application will be available at http://localhost:5173. + +### Deploying your application to the cloud + +First, build your image, e.g.: `docker build -t myapp .`. +If your cloud uses a different CPU architecture than your development +machine (e.g., you are on a Mac M1 and your cloud provider is amd64), +you'll want to build the image for that platform, e.g.: +`docker build --platform=linux/amd64 -t myapp .`. + +Then, push it to your registry, e.g. `docker push myregistry.com/myapp`. + +Consult Docker's [getting started](https://docs.docker.com/go/get-started-sharing/) +docs for more detail on building and pushing. + +### References +* [Docker's Node.js guide](https://docs.docker.com/language/nodejs/) \ No newline at end of file diff --git a/app/static/css/style.css b/app/static/css/style.css deleted file mode 100644 index e69de29b..00000000 diff --git a/app/views/html/index.html b/app/views/html/index.html deleted file mode 100644 index e69de29b..00000000 diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..f94242b4 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,15 @@ +services: + server: + build: + context: ./frontend/vite-project + environment: + NODE_ENV: production + ports: + - 5173:5173 + develop: + watch: + - path: ./frontend/vite-project/package.json + action: rebuild + - path: ./frontend/vite-project + target: /usr/src/app + action: sync diff --git a/docs/padronizacaoIssues.md b/docs/padronizacaoIssues.md index 1dff311b..6515c81d 100644 --- a/docs/padronizacaoIssues.md +++ b/docs/padronizacaoIssues.md @@ -92,3 +92,4 @@ O mapa interativo não está carregando ao acessar a página inicial. --- Seguindo este padrão, garantimos a consistência e a produtividade no gerenciamento das issues do projeto **Urbanize**. + diff --git a/frontend/vite-project/Dockerfile b/frontend/vite-project/Dockerfile new file mode 100644 index 00000000..5a98652f --- /dev/null +++ b/frontend/vite-project/Dockerfile @@ -0,0 +1,22 @@ +# Dockerfile + +# Use uma imagem base do Node.js +FROM node:18 + +# Defina o diretório de trabalho no contêiner +WORKDIR /usr/src/app + +# Copie os arquivos do package.json e package-lock.json +COPY package*.json ./ + +# Instale as dependências do projeto +RUN npm install + +# Copie o restante do projeto para o diretório de trabalho +COPY . . + +# Exponha a porta padrão do Vite (geralmente é 5173) +EXPOSE 5173 + +# Comando padrão para iniciar o Vite +CMD npm run dev -- --host diff --git a/frontend/vite-project/src/App.tsx b/frontend/vite-project/src/App.tsx index 3d7ded3f..40856275 100644 --- a/frontend/vite-project/src/App.tsx +++ b/frontend/vite-project/src/App.tsx @@ -26,7 +26,7 @@ function App() {
- Click on the Vite and React logos to learn more + Click on the Vite and React to learn more
> ) diff --git a/venv/pyvenv.cfg b/venv/pyvenv.cfg index 1f2da03a..ffab8469 100644 --- a/venv/pyvenv.cfg +++ b/venv/pyvenv.cfg @@ -2,4 +2,4 @@ home = /usr/bin include-system-site-packages = false version = 3.12.3 executable = /usr/bin/python3.12 -command = /usr/bin/python3 -m venv /home/bessa/Documents/disciplinas/MDS/Projeto/2024-2-Squad02/venv +command = /usr/bin/python3 -m venv /home/mateus/Área de trabalho/mds-arquivos/2024-2-Urbanize/venv