- Trinh Thu Hai
- Tran Le Hoang
- Tran Hai Son
- Le Duc Dung
- Hoang Tuan Anh Van
- Dang Quang Minh
- Pham Tuan Son
- Tran Trung Hieu
- Vu Hai Dang
- Pham Van Khoa
Please read our CONTRIBUTING document.
Setup Python virtual environment and install dependencies to suppress import warnings in VSCode while working with backend:
cd backend/
python -m venv env
source env/bin/activate
pip3 install -r requirements_[YOUR_OS].txt
Then reload your vscode and select env/bin/python as the main Python interpreter for vscode
Install extension Python Docstring Generator (optional)
- Change default docstring format from Google to Sphinx
# start backend server and required services
docker-compose up
If this the first time you setup the backend, you need to run the migrate command inside the backend container:
docker-compose exec backend python3 manage.py migrate
Prerequisite: nodejs
and npm
installed.
1. Set up local developing environment (VSCode, ...)
cd frontend/
# install dependencies (run once)
# Note: should not try to resolve any vulnerabilities
npm i
In case you do not use docker, run this command to start frontend server (port 3000)
Then open http://localhost:3000 to view it in the browser. You should first register an account in login page.
# start frontend (in case you do not use docker)
npm run start
2. Set up docker enviroment for developing
cd frontend/
# start frontend server (port 3000)
docker-compose up
The backend server will run on port 8000 and the frontend server will run on port 3000. Please make sure these ports are available on your server.
# Start all the required services
docker-compose -f docker-compose.prod.yml up -d
If this the first time you setup the production server, you need to run the migrate command inside the backend container:
docker-compose -f docker-compose.prod.yml exec backend python3 manage.py migrate
docker-compose -f docker-compose.[ENV].yml exec [COMMAND]
python3 manage.py createsuperuser
python3 manage.py migrate
Note: do not run this command if you're not permitted by the team leader. Otherwise, all PR include migrations changes will be rejected.
python3 manage.py makemigrations
python3 manage.py test api.tests.unit_tests
Some old versions of Docker may require setting enviroment variable DOCKER_BUILDKIT
to 1.
DOCKER_BUILDKIT=1 docker-compose build