This guide provides the essential steps to set up and run the Feasto application using Docker.
1.Ensure you have the following installed:
- Docker & Docker Compose
- Git
- Make
-
Clone the Repository
git clone "https://github.com/riteshco/Feasto" cd Feasto
-
Run the following command to setup the environment and docker container for you.
chmod +x ./SetupScript.sh ./SetupScript.sh
git clone "https://github.com/riteshco/Feasto"
cd FeastoYou need to create three .env files for the application to work.
A. Root .env file
- Location: In the project's root directory (same level as
docker-compose.yml). - Create a file named:
.env - Content:
MYSQL_ROOT_PASS=your_root_password MYSQL_DB_NAME=feasto MYSQL_USER_NAME=user_name MYSQL_USER_PASS=user_password
B. Backend .env file
- Location: Inside the
Feasto_backenddirectory. - Create a file named:
.env - Content:
MYSQL_HOST=db #<----This should stay as "db", don't change this variable MYSQL_PORT=3306 MYSQL_DATABASE=feasto MYSQL_USER=test_user MYSQL_PASSWORD=your_mysql_password MYSQL_ROOT_PASSWORD=your_root_password JWT_SECRET=your_secret
C. Frontend .env file
- Location: Inside the
Feasto_frontenddirectory. - Create a file named:
.env.development - Content:
VITE_API_BASE_URL=http://localhost:3000/api
Use the provided Makefile for simple commands. Run these from the project's root directory.
-
To build and start everything (first time):
make build
-
To start the application again later:
make up
-
To follow the application logs:
make logs
-
To stop the application:
make down
-
To stop and delete all data for a fresh start:
make clean
- Frontend:
http://localhost:5173 - Backend API:
http://localhost:3000 - Database: Connect a tool to
127.0.0.1:3307(User: mysql_username, Pass: your_mysql_password)