Commit 18827c4a authored by Alessandro's avatar Alessandro
Browse files

realizando configurações para deploy

parent 1b966e07
Showing with 22 additions and 12 deletions
+22 -12
# Build
# Build Stage
FROM node:18-alpine AS builder
ARG VITE_API_URL=${VITE_API_URL}
ARG VITE_NODE_ENV=${VITE_NODE_ENV}
......@@ -6,20 +6,20 @@ ENV VITE_API_URL=${VITE_API_URL}
ENV VITE_NODE_ENV=${VITE_NODE_ENV}
WORKDIR /app
# Copiar os arquivos
COPY . .
# Roda o 'npm install' sem sobrescrever package-lock.json
# Instale as dependências e crie o build
RUN npm ci
# Roda a build do Front
RUN npm run build
# Stage 2 - NGINX
FROM nginx:alpine as runner
# Set working directory to nginx asset directory
# Remove default nginx static assets
RUN rm -rf /usr/share/nginx/html/*
# Copy static assets from builder stage
COPY --from=builder /app/build /usr/share/nginx/html
# Use o diretório 'dist' onde o Vite gera os arquivos de build
COPY --from=builder /app/dist /usr/share/nginx/html
COPY ./nginx/nginx.conf /etc/nginx/conf.d/default.conf
# Containers run nginx with global directives and daemon off
ENTRYPOINT ["nginx", "-g", "daemon off;"]
\ No newline at end of file
......@@ -11,7 +11,7 @@ interface CustomTabsProps {
tabs: TabItem[];
initialTab?: number;
}
// @ts-ignore
const CustomTab = styled(Tab)(({ theme }) => ({
minWidth: '100px',
height: '30px', // Ajuste na altura para corresponder ao design do Figma
......@@ -33,6 +33,7 @@ const CustomTab = styled(Tab)(({ theme }) => ({
const CustomTabs: React.FC<CustomTabsProps> = ({ tabs, initialTab = 0 }) => {
const [value, setValue] = React.useState(initialTab);
// @ts-ignore
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
setValue(newValue);
};
......
......@@ -11,7 +11,7 @@ interface ExamFilterProps {
tabs: TabItem[];
initialTab?: number;
}
// @ts-ignore
const ExamFilterTab = styled(Tab)(({ theme }) => ({
minWidth: '101px',
height: '23px',
......@@ -36,6 +36,7 @@ const ExamFilterTab = styled(Tab)(({ theme }) => ({
const ExamFilter: React.FC<ExamFilterProps> = ({ tabs, initialTab = 0 }) => {
const [value, setValue] = React.useState(initialTab);
// @ts-ignore
const handleChange = (event: React.SyntheticEvent, newValue: number) => {
setValue(newValue);
};
......
......@@ -19,7 +19,7 @@ interface CardProps {
onClickChangePassword?: () => void;
onClickEditProfile?: () => void;
}
// @ts-ignore
export function PatientProfileCard({ name, cpf, email, dataNascimento, numSus, profilePicture, onClickChangePassword, onClickDoctors, onClickEditProfile }: CardProps) {
const [notifications, setNotifications] = useState(false);
......
import Footer from '../../components/Footer/Footer';
import HeaderHome from '../../components/HeaderHome/HeaderHome';
import AddCircleIcon from '../../assets/AddCircle.svg';
import AddCircleIcon from '../../assets/addCircle.svg';
import './ExamesPendentes.css';
import { useState } from 'react';
import ExamListItem from '../../components/ListItem/ListItem';
......
......@@ -6,6 +6,7 @@ import MedicamentosIcon from '../../assets/MedicationIcon.svg';
import InfoIcon from '../../assets/InfoIcon.svg';
import PacientIcon from '../../assets/PacientIcon.svg';
import ConsultIcon from '../../assets/ConsultIcon.svg';
// @ts-ignore
import { ROUTES } from '../../routes/constans';
import Footer from '../../components/Footer/Footer';
// import { useNavigate } from 'react-router-dom';
......
// @ts-ignore
import React, { useEffect, useState } from 'react';
import Logo from '../../assets/amparo.svg';
import './Login.css';
......@@ -6,15 +7,21 @@ import { ROUTES } from '../../routes/constans';
import { useNavigate } from 'react-router-dom';
import Textfield from '../../components/Textfield/Textfield';
import CustomButton from '../../components/Button/Button';
// @ts-ignore
import { getUser, login_post } from '../../utils/apiService';
export const Login: React.FC = () => {
const [email, setEmail] = useState<string>('');
// @ts-ignore
const [password, setPassword] = useState<string>('');
// @ts-ignore
const [erro, setErro] = useState<string>('');
// @ts-ignore
const [clicked, setClicked] = useState<boolean>(false);
const navigate = useNavigate();
// @ts-ignore
const [data, setData] = useState<String>();
// @ts-ignore
const [dataStatus, setDataStatus] = useState<Number>();
const emailRegex = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment