diff --git a/Dockerfile.backend b/Dockerfile.backend index 2198ce9980..a5b73b04f5 100644 --- a/Dockerfile.backend +++ b/Dockerfile.backend @@ -1,16 +1,15 @@ -FROM python:3.9-slim-buster +FROM python:3.11-slim-bookworm WORKDIR /app -RUN apt-get update && apt-get install -y --no-install-recommends -build-essential +RUN apt-get update && apt-get install -y --no-install-recommends \ +build-essential \ libpq-dev COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY src/ /app/src -COPY wsgi.py . EXPOSE 8000 diff --git a/Dockerfile.frontend b/Dockerfile.frontend index 3333403726..d496240de6 100644 --- a/Dockerfile.frontend +++ b/Dockerfile.frontend @@ -3,6 +3,8 @@ FROM node:20-alpine AS builder WORKDIR /app COPY package.json package-lock.json vite.config.js ./ +COPY index.html . + RUN npm install COPY src/front/ ./src/front/ diff --git a/docker-compose.yml b/docker-compose.yml index e795eb49aa..b556fe1518 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,10 +1,8 @@ -version: '3.8' - services: # Servicio del Backend (Python/Flask API) server: build: - context: . # El contexto es la raíz, donde están todos los archivos + context: . # El contexto es la raíz, donde están todos los archivos dockerfile: Dockerfile.backend # Especifica qué Dockerfile usar restart: always env_file: ./.env @@ -54,4 +52,4 @@ networks: volumes: postgres-data: - driver: local \ No newline at end of file + driver: local diff --git a/src/front/components/BackendURL.jsx b/src/front/components/BackendURL.jsx deleted file mode 100644 index ae80b8e43a..0000000000 --- a/src/front/components/BackendURL.jsx +++ /dev/null @@ -1,23 +0,0 @@ -import React, { Component } from "react"; -import envFile from "../../../docs/assets/env-file.png" - -const Dark = ({children}) => {children}; -export const BackendURL = () => ( -
-

Missing BACKEND_URL env variable

-

Here's a video tutorial on how to update your backend URL environment variable.

-

There's a file called .env that contains the environmental variables for your project.

-

There's one variable called BACKEND_URL that needs to be manually set by yourself.

-
    -
  1. Make sure you backend is running on port 3001.
  2. -
  3. Open your API and copy the API host.
  4. -
  5. Open the .env file (do not open the .env.example)
  6. -
  7. Add a new variable VITE_BACKEND_URL=your api host
  8. -
  9. Replace your api host with the public API URL of your flask backend sever running at port 3001
  10. -
-
- -
-

Note: If you are publishing your website to Heroku, Render.com or any other hosting you probably need to follow other steps.

-
-); \ No newline at end of file diff --git a/src/front/components/HeaderContact.jsx b/src/front/components/HeaderContact.jsx index 36df008b2b..980f64f523 100644 --- a/src/front/components/HeaderContact.jsx +++ b/src/front/components/HeaderContact.jsx @@ -61,164 +61,164 @@ const HeaderContact = () => { return ( <> -
- CloudTech background image - -
-
-
-
-

- {t('contact.sectionTitle')} -

- -

- {t('contact.sectionTitle')} -

- -

- {t('contact.sectionDescription')} -

- -

- {t('contact.sectionDescription')} -

- -
-
- - - - {status === 'error' && error?.name &&
{error.name}
} -
- -
-
-
+
+
+
- -
-
-
- + ); }; diff --git a/src/front/main.jsx b/src/front/main.jsx index 15c01ecd4d..77aff83736 100644 --- a/src/front/main.jsx +++ b/src/front/main.jsx @@ -4,17 +4,11 @@ import './index.css' // Global styles for your application import { RouterProvider } from "react-router-dom"; // Import RouterProvider to use the router import { router } from "./routes"; // Import the router configuration import { StoreProvider } from './hooks/useGlobalReducer'; // Import the StoreProvider for global state management -import { BackendURL } from './components/BackendURL'; import 'bootstrap/dist/css/bootstrap.min.css'; import './i18n'; const Main = () => { - if (! import.meta.env.VITE_BACKEND_URL || import.meta.env.VITE_BACKEND_URL == "") return ( - - - - ); return (