This is an Aristotle paraphrase project: https://arph.ru
See data submodule for texts itself.
React + redux toolkit, node express
Create two files with the following content:
src/.env
src/be/.env
src/fe/.env
GIT_KEY=None
IS_IN_DOCKER=false
REACT_APP_HOST=localhost
REACT_APP_PORT=5000
REACT_APP_PROTOCOL=http
GIT_KEY= # github personal access token
IS_IN_DOCKER=true
REACT_APP_HOST=ariphrase.ru
REACT_APP_PORT=443
REACT_APP_PROTOCOL=https
GIT_KEY
- your github personal access token, that should have push access to data repository. This variable will be partially exposed to fewindow.env
variable.IS_IN_DOCKER
- you can't test git data editor if you start be server outside of docker. The root of this issue is security: to test this flow, you should inject yourGIT_KEY
in git submodule origin url, and the git submodule sometimes will not understand what you want. Idk how to fix it right now.REACT_APP_HOST
- a browser will send requests to this backend hostREACT_APP_PORT
- a browser will send requests to this backend portREACT_APP_PROTOCOL
- a browser will send requests with this backend protocol
cd src
docker-compose build
docker-compose up
Pull/push with /scripts
.
Clone this repo with /src/be/src/data
submodule
cd src/be
yarn
yarn start
Using a developer build, you will not be able to push changes elsewhere: all git functions will be mocked.
cd src/fe
yarn
yarn start
cd src/be
yarn chapter 1 2 3
, where1
is book id,2
is chapter id and3
is paragraphs count (f.e., from 1 to 3 included). Existing files will be touched, unexisting files will be created as empty.yarn chapter 1 2 1,4
- create book 1, chapter 2, paragraphs 1 and 4 onlyyarn chapter 1 2 1-4
- create book 1, chapter 2, paragraphs 1, 2, 3 and 4
cd src/be
yarn wiki
will apply common russian text rules
sudo certbot certonly --manual
- Update
acme-challenge
directory at host machine (it will be mapped inside ngx docker container) - Check that new certs appears (see certbot output, default folder is
/etc/letsencrypt/live/%domain%
) - Check that certificates is valid using
sudo openssl x509 -enddate -noout -in fullchain.pem
- Copy new certificates to host
crt
directory (it is mapped inside ngx docker container) - Restart docker containers
- prerender
/
and/contacts
- uglify (s)css with modules hash
- lazy load
- optimize caching