This is a monorepo containing a Laravel server and a React client, configured with Docker and PostgreSQL.
Before getting started, make sure you have the following tools installed on your system:
- Docker
- Docker Compose
Follow the steps below to run the application:
-
Clone the repository:
git clone https://github.com/ishgervais/clean-tech-assessment.git
-
Navigate to the root root
cd your-repo
-
Navigate the server
cd server composer install
-
Generate an application key
php artisan key:generate
-
Start the server
php artisan serve
-
Access the server
Access the React client at http://localhost:8000.
-
Navigate and install dependencies
cd client pnpm install
-
Start the server
pnpm run dev
-
Access the app
Access the React client at http://localhost:3000.
-
Navigate to the project root:
cd clean-tech-assessment
-
Start the Docker containers
docker-compose up -d
The docker-compose.yml file defines the services and their configurations for the application. It includes:
Environment variables for the PostgreSQL service. Laravel Server The Laravel server is located in the server directory. It comes with a Dockerfile for containerization.
The Dockerfile for the Laravel server is included in the server directory. It sets up the necessary dependencies and exposes port 8000.
The React client is located in the client directory. It comes with a Dockerfile for containerization.
The Dockerfile for the React client is included in the client directory. It installs dependencies and builds the React application, exposing port 3000.
The PostgreSQL database is set up as a service using Docker Compose. It is pre-configured with default credentials and accessible on port 5432.