Github镜像

visuddhinanda 0b79a82ffc :bug: 表名没用配置文件信息 il y a 4 ans
app cbd000d6e5 :tada: 完成 install:wbwtemplate il y a 4 ans
bootstrap fd829c1f6d :tada: move to laravel il y a 4 ans
config fd829c1f6d :tada: move to laravel il y a 4 ans
database 157c3ffa12 删去sql function FUNCTION query_pali il y a 4 ans
docker 283e9d2719 移动docker到根目录下 il y a 4 ans
public 0b79a82ffc :bug: 表名没用配置文件信息 il y a 4 ans
resources d70abb12e9 view 测试 il y a 4 ans
routes d70abb12e9 view 测试 il y a 4 ans
storage 38b1c57855 :sparkles: 添加依赖项目目录 il y a 4 ans
tests fd829c1f6d :tada: move to laravel il y a 4 ans
v1 283e9d2719 移动docker到根目录下 il y a 4 ans
.editorconfig fd829c1f6d :tada: move to laravel il y a 4 ans
.env.example fd829c1f6d :tada: move to laravel il y a 4 ans
.gitattributes fd829c1f6d :tada: move to laravel il y a 4 ans
.gitignore 87828f1bd4 add *.lock il y a 4 ans
.gitmodules 55ed866901 add git submodule il y a 4 ans
.styleci.yml fd829c1f6d :tada: move to laravel il y a 4 ans
LICENSE 83377bd153 增加许可证 il y a 4 ans
README.md 32bc1a9d53 Merge branch 'laravel' of https://github.com/visuddhinanda/mint into laravel il y a 4 ans
artisan fd829c1f6d :tada: move to laravel il y a 4 ans
composer.json fd829c1f6d :tada: move to laravel il y a 4 ans
package.json fd829c1f6d :tada: move to laravel il y a 4 ans
phpunit.xml fd829c1f6d :tada: move to laravel il y a 4 ans
server.php fd829c1f6d :tada: move to laravel il y a 4 ans
webpack.mix.js fd829c1f6d :tada: move to laravel il y a 4 ans

README.md

IAPT Pali Canon Platform

About

这是一个开放的基于语料库的巴利语学习和翻译平台。

后端:

  • PHP 8.0+
  • laravel 8.x
  • PostgreSQL v12+
  • Redis

前端

  • jQuery

工具

  • git
  • composer
  • npm or yarn
  • vscode

安装

开发环境

使用 Linux 的开发者请参阅 <项目文件夹>/docker/readme.md 容器中包含了全部开发环境。请忽略下面关于开发环境的安装。

PostgreSQL

最小版本v12。下载链接 https://www.postgresql.org/download/

温馨提示:windows环境安装完之后 将 安装目录/bin加入环境变量 PATH。重启电脑。在命令行输入 psql -v 查看版本号。

建立新的数据库,如:create database iapt

createdb

PHP 8

Redis

composer

npm

yarn

Fork

Fork https://github.com/iapt-platform/mint 到你自己的仓库

Clone

git clone https://github.com/<your>/mint.git  --recurse-submodules

安装依赖

项目根目录下运行

composer install
npm install

/public 目录下运行

composer install
npm install

修改配置文件

复制 .env.example -> .env

修改为你的db配置

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=iapt
DB_USERNAME=postgres
DB_PASSWORD=

复制 public/.env.example -> .env

复制 public/app/config.example.php -> config.php

复制 public/app/config.example.js -> config.js

修改相关配置

复制巴利语全文搜索单词表

获取pg share dir

pg_config --sharedir

把下面/usr/share/postgresql/14替换为你自己的shardir

liunx

sudo cp ./public/app/fts/pali.stop /usr/share/postgresql/14/tsearch_data/
sudo cp ./public/app/fts/pali.syn /usr/share/postgresql/14/tsearch_data/

windows

cp ./public/app/fts/pali.stop /usr/share/postgresql/14/tsearch_data/
cp ./public/app/fts/pali.syn /usr/share/postgresql/14/tsearch_data/

application encryption key

在<工程目录>下运行

php artisan key:generate

数据库迁移

在根目录下运行

php artisan migrate

语料数据库填充

Liunx

cd public/deploy
sh ./install.sh

Window

cd public/deploy
./install.bat

运行时间较长。本地开发环境大约4小时。

运行dev server

php artisan serve

在浏览器中访问

http://127.0.0.1:8000