Finish project

This commit is contained in:
Rayan Konecny do Nascimento 2025-04-22 16:50:16 +00:00
parent 6b1bb60fbf
commit 5037b459b2
5 changed files with 64 additions and 3 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
# Dockerfile
FROM node:20-alpine
WORKDIR /app
# Copiar arquivos e instalar dependências
COPY package*.json ./
RUN npm install -g @angular/cli && npm install
# Copiar o restante do código
COPY . .
# Expor a porta padrão do Angular
EXPOSE 4200
# Comando para servir o Angular na rede
CMD ["ng", "serve", "--host", "0.0.0.0"]

11
Dockerfile.mock Normal file
View file

@ -0,0 +1,11 @@
FROM node:20-alpine
WORKDIR /app
RUN npm install -g json-server
COPY db.json .
EXPOSE 3000
CMD ["json-server", "--watch", "db.json", "--port", "3000"]

11
nginx.conf Normal file
View file

@ -0,0 +1,11 @@
server {
listen 80;
server_name localhost;
root /usr/share/nginx/html;
index index.html;
location / {
try_files $uri $uri/ /index.html;
}
}

22
podman-compose.yml Normal file
View file

@ -0,0 +1,22 @@
version: "3.9"
services:
my-task-board:
build:
context: .
dockerfile: Dockerfile # Dockerfile para o Angular
container_name: my-task-board
ports:
- "4200:4200"
volumes:
- .:/app
command: ["npx", "ng", "serve", "--host", "0.0.0.0", "--poll=2000"]
depends_on:
- json-server
json-server:
build:
context: .
dockerfile: Dockerfile.mock # Dockerfile para o JSON Server
container_name: json-server
ports:
- "3000:3000"

View file

@ -11,15 +11,15 @@ const MODULES = [MatDivider];
standalone: true, standalone: true,
imports: [...COMPONENTS,...MODULES], imports: [...COMPONENTS,...MODULES],
template: ` template: `
<div class="h-screen flex w-full border-4"> <div class="h-screen flex w-full">
<!-- Categorias --> <!-- Categorias -->
<app-category class="w-1/4 opacity-50" /> <app-category class="w-1/4 opacity-50" />
<!-- Divisor --> <!-- Divisor -->
<mat-divider class="h-full border-2" /> <mat-divider class="h-full" />
<!-- Tarefas --> <!-- Tarefas -->
<app-task class="w-3/4 border-2 pt-10" /> <app-task class="w-3/4 pt-10" />
</div> </div>
`, `,
styles: ``, styles: ``,