sbt-idp/cope2n-api
2023-12-25 10:32:09 +07:00
..
env_sample Add: BE, FE 2023-11-30 18:19:06 +07:00
fwd Add: S3 status 2023-12-25 10:32:09 +07:00
fwd_api Add: S3 status 2023-12-25 10:32:09 +07:00
locale Add: BE, FE 2023-11-30 18:19:06 +07:00
scripts Add: BE, FE 2023-11-30 18:19:06 +07:00
static Add: BE, FE 2023-11-30 18:19:06 +07:00
add_user.py Add: BE, FE 2023-11-30 18:19:06 +07:00
dev.docker-compose.yml.dev Add: BE, FE 2023-11-30 18:19:06 +07:00
docker-compose.yml Add: BE, FE 2023-11-30 18:19:06 +07:00
docker-persistent.yml Add: BE, FE 2023-11-30 18:19:06 +07:00
Dockerfile Update: new deploy flow for AWS 2023-12-22 10:54:04 +07:00
Dockerfile-dev Add: BE, FE 2023-11-30 18:19:06 +07:00
manage.py Add: BE, FE 2023-11-30 18:19:06 +07:00
README.md Add: BE, FE 2023-11-30 18:19:06 +07:00
requirements.txt Add: S3 status 2023-12-25 10:32:09 +07:00
TODO.md Add: BE, FE 2023-11-30 18:19:06 +07:00

Project AI Backend for Frontend

1. Run DB and RabbitMQ (skip ì you already install)

docker compose -f docker-persistent up --build

2. Migrate Database Schema ( If needed )

1.1 Make migration file python manage.py makemigrations

1.2 Apply to database python manage.py migrate

3. Run Project

2.1 Run with Docker

2.1.1 Add file .env at same folder level with docker-compose.yml.

Sample at env_sample/example_{OS}_env (Window / Linux)

2.1.2 Build & Run Image By Command

docker compose up --build

2.2 Local Development Run

2.2.1 Add file .env at same folder level with docker-compose.yml.

Sample at env_sample/example_local_env

2.2.2 Run API

python manage.py runserver 0.0.0.0:8000

2.2.3 Run Worker

celery -A fwd_api.proj.worker worker -l INFO --without-gossip --without-mingle --without-heartbeat -Ofair --pool=solo