This project implements a very simple but effective flash sale system, allowing users to purchase products at discounted prices for a limited time. The system is designed to be set up using Docker for easy deployment and management.
- Docker Installed: Ensure that Docker is installed on your system. Docker allows you to package and distribute applications and their dependencies as containers.
To configure the necessary environment variables for the project, follow these steps:
-
Rename the example environment file provided (
example.env
) to.env
. This file will contain the environment variables required for the project.mv example.env .env
This command renames
example.env
to.env
, ensuring that the environment variables are properly configured for your local environment.
- Use the provided Docker Compose file to set up a PostgreSQL database instance.
- Run the following command in your terminal:
docker compose up -d
This command will start the PostgreSQL container in detached mode (-d), allowing it to run in the background.
- After initializing the PostgreSQL instance, proceed to run the project.
- Utilize the provided Makefile to simplify the process.
- Run the following command in your terminal:
make run
This command will execute the necessary steps to run the flash sale project.