Đây là dự án xây dựng cổng thông tin điện tử công giáo của người Việt Nam tại Nhật bản. Mục đích là giúp cho việc truyền đạt thông tin của quý Cha, Thầy, Sơ và các nhóm giới trẻ đến với mọi người một cách dễ dàng nhất. Rất mong sự hiệp lực đóng góp của cộng đồng anh em công giáo tại Nhật.
brew install mysql python n
n lts
npm i -g yarn
Kiểm tra:
python -V
# Python 3.8.5
node -v
# v14.16.1
npm -v
# 6.14.12
yarn -v
# 2.4.1
yarn install
yarn workspace fronend add package-name
This will make sure our package configuration is kept nicely isolated from any other projects we're working on.
cd backend
python3 -m venv env
source env/bin/activate
Now that we're inside a virtual environment, we can install our package requirements.
pip install -r requirements/base.txt
pip install -r requirements/development.txt
pip install -r requirements/testing.txt
For quick development we use sqlite3, it will be generated automatically when you run the following command.
bash run_migrate.sh
bash run_server.sh
yarn workspace frontendside run start
# Truy cập http://localhost:3000
Cài docker theo hướng dẫn tại đây
Cài docker-compose theo hướng dẫn tại đây
Chạy trên local:
cd backendside
docker-compose up -d --build
docker-compose exec vietcatholicjp-backend sh
bash run_migrate.sh
bash run_create_admin.sh ## Create with username: `christian`
docker-compose exec vietcatholicjp-backend npm run build
or
docker-compose exec vietcatholicjp-backend bash
npm run build
docker-compose exec vietcatholicjp-backend rs
# Truy cập http://localhost:8000
Truy cập vào backend container
docker-compose exec vietcatholicjp-backend sh
Truy cập vào db container
docker-compose exec vietcatholic-db sh
mysql -u username -p
Cài docker theo hướng dẫn tại đây
Tạo tệp .env
với nội dung như sau:
DB_NAME=my_db
DB_USER=my_user
DB_PASSWORD=my_password
DB_HOSTNAME=localhost
bash run_migrate.sh
Về bản chất, lệnh này tương đương với:
cd project
python3 manage.py makemigrations
python3 manage.py migrate
Tạo tài khoản user1
với mật khẩu tùy ý bằng cách chạy:
bash run_create_admin.sh
Về bản chất, lệnh này tương đương với:
cd project
python3 manage.py createsuperuser