After pull repo ensure conda is installed in your PC.
run following command.
conda env create --prefix /app/env -f environment.yml
activate env
conda activate .\env
after these create a .env file or rename .env.prod to .env ensure all varibale should be there.
- Pull the repo
- Create an Account on AWS -> Get Access Key, Security Key, Regeion.
- Setup S3 Bucket and create a main project name folder.
- put all in .env file
- start your mysql server and create face_album database -> set root password root it is default. if you want to use different password change it in .env file
- put all in .env file
before start celery ensure salary is intalled into your system and running on 6379 port.
run following command to start and log backround task like -> face detction and classification.
celery -A run.celery --loglevel=info
- Create account -> create an index with default 128D
- Get API Access Key and Index
- put all in .env file
if you want to setup google login then go to google auth console and create api and secret paste it into .env's varibale
in this project we have used ZeptoMail for sending email like OTP. so create account there and setup your domain. or you can use another email service for email but you may need to modify backend/app/functions/send_email.py. after that you can paste it into .env file
There is varibale called ALLOWED_ORIGINS in .env so you can set those origins where you want to request it helps to secure you google auth.
flask --app run.py db init
flask --app run.py db migrate -m "initial commit"
flask --app run.py db upgrade
to dockerize the project make sure you have latest version of Docker (>24) and Dockert Composer (>2.2)
ensure port is available for running there are 4 ports 5000, 80, 6379, 3306
run following command to build docker and setup
docker compose build
docker-compose up -d
ensure your docker images are running
docker compose ps
now you can test your project is ready on even docker.
you can push the images on aws ECR, Docker, or any and pull on server.