1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-07 22:45:23 +02:00
Application de documentation gratuite, basé sur l'écosystème Editor.js offrant toutes les opportunités modernes pour travailler avec du contenu. https://codex.so
Find a file
2021-05-25 15:12:57 +03:00
bin Move testing to 3001 port (#8) 2018-10-07 19:15:10 +03:00
config Transport controller and file model (#42) 2019-03-11 18:44:00 +03:00
public Editorjs checklist tool (#98) 2020-05-09 05:38:25 +03:00
src Implement default redirect (#99) 2020-05-09 14:17:29 +03:00
test Transport controller and file model (#42) 2019-03-11 18:44:00 +03:00
.codexdocsrc.sample Implement default redirect (#99) 2020-05-09 14:17:29 +03:00
.editorconfig Page model (#1) 2018-08-17 13:58:44 +03:00
.eslintignore Frontent build system is ready (#3) 2018-09-07 19:24:09 +03:00
.eslintrc Babel eslint parser (#9) 2018-10-07 19:25:12 +03:00
.gitignore Transport controller and file model (#42) 2019-03-11 18:44:00 +03:00
.nvmrc Add nvmrc (#2) 2018-09-03 23:05:50 +03:00
generatePassword.js Authentication (#22) 2019-03-06 13:22:57 +03:00
nodemon.json Create nodemon.json (#26) 2019-01-25 00:31:49 +03:00
package.json Editorjs checklist tool (#98) 2020-05-09 05:38:25 +03:00
README.md README for docker 2021-05-25 15:12:57 +03:00
webpack.config.js Update Editor and Tools (#56) 2019-03-08 15:38:22 +03:00
yarn.lock Editorjs checklist tool (#98) 2020-05-09 05:38:25 +03:00

Docker installation

Create docker-compose.yml configuration with the following content

version: "3.2"
services:
  docs:
    image: codexteamuser/codex-docs:prod
    ports:
      - 127.0.0.1:8001:8000
    volumes:
      - ./.codexdocsrc:/usr/src/app/.codexdocsrc:ro
      - ./config/production.json:/usr/src/app/config/production.json:ro
      - ./public/uploads:/usr/src/app/public/uploads
      - .db:/usr/src/app/.db

Create empty folders .db, public and config.

Create the production config ./config/production.json with the following content:

{
  "port": 8000,
  "database": ".db",
  "uploads": "public/uploads",
  "secret": "[password]"
}

Port 8000 should equal to the internal port in docker-compose.yml. Fill secret with some random password.

Create the config codexdocsrc with the following content:

{
  "title": "Docs",
  "description": "The documents",
  "menu": [
    {"title": "Main", "uri": "/main"}
  ],
  "landingFrameSrc": "",
  "startPage": "main",
  "misprintsChatId": "",
  "yandexMetrikaId": ""
}

Now you can run the Docs with docker-compose up -d.

Do not forget to initialize password with docker-compose exec docs yarn generatePassword [password]

Set up the environment

Install node version manager and required version of node js

$ chmod u+x ./bin/nvm.sh && ./bin/nvm.sh
$ nvm install

For windows use nvm for windows

Install Yarn package manager

$ brew install yarn --without-node

Use --without-node flag because nvm version of Node is used

Or download it directly from the website

Install npm packages

$ yarn install --frozen-lockfile

Available scripts

Start the server

$ yarn start

Run ESLint with --fix option

$ yarn lint

Run tests

$ yarn test

Authentication

To manage pages you need to authorize (available on /auth).

To generate password use yarn generatePassword [password] command.