This project is a web application to have an easy access to It is a full-stack application containing an Express.js backend and a React.js frontend, dockerized using a single Dockerfile for easier deployment and containerization.
This application is composed of three parts:
- Backend: Built using Express, it provides API endpoints and handles server-side operations.
- Frontend: Developed in React, it offers a user interface to interact with the backend services.
- Backoffice: Developed in React, it offers a simple way to handle the application configuration
Each part is encapsulated within a Docker container using a single Dockerfile for streamlined deployment.
Make sure you have the following prerequisites installed:
- Docker: Install Docker
- Node.js 18, we highly recommend using nvm
Follow these steps to set up and run the application:
-
Clone the repository:
git clone https://github.com/Inist-CNRS/tdm-factory.git
-
Navigate to the project directory:
cd tdm-factory
Build the Docker image using the provided Dockerfile:
docker build . -t tdm:v1.0.0 --no-cache
To create a new version of IA Factory, create a new GitHub release with an associated tags. This will run the ci and push an image into Docker Hub.
To run the application in a Docker container:
docker run -p 3000:3000 tdm:v1.0.0
The frontend will be accessible at http://localhost:3000/
, the swagger configuration
at http://localhost:3000/swagger-config
and the back-office at http://localhost:3000/admin
.
You also need a ngrok host for the external host in tdm-be/config/development.json
,
to create a ngrok endpoints run ngrok http 3000
.
After setting up this you can run make run-dev
When you start the dev mode, you will be able to access those links:
http://localhost:3000
- Backend parthttp://localhost:5173
- Frontend parthttp://localhost:5174
- Backoffice parthttp://localhost:1080
- Mail service (use to test the mail sending functionality)