This project sets up an Express.js application with PostgreSQL and Redis, all running in Docker containers. The application also integrates with the Gemini API. The application is accessible at http://localhost:8080
.
For the frontend, refer to the chatPDF-client repository. Follow the instructions in the frontend repository to set up and run the frontend application.
Ensure you have the following installed on your local machine:
Follow these steps to set up and run the project:
git clone https://github.com/HardikChoudhary24/chatPDF-server.git
cd chatPDF-server
-
Copy the example environment file to a new file named
.env
and populate it with your actual keys and configuration values:cp .example.env .env
Use Docker Compose to build and start the containers:
docker-compose up --build
This command will:
- Start a PostgreSQL container.
- Start a Redis container.
- Build and start the Express.js application container.
Once the containers are up and running, you can access the application at:
http://localhost:8080
- src/: Contains the source code of the Express.js application.
- docker-compose.yml: Defines the Docker services (PostgreSQL, Redis, and Express app).
- Dockerfile: Instructions to build the Docker image for the Express app.
- .env.example: Example environment variables file.
- init-db/: Contains database initialization scripts (if any).
To stop the running containers:
docker-compose down
If you make changes to the Docker configuration or the application code, you may need to rebuild the containers:
docker-compose up --build