diff --git a/README.md b/README.md index 7c46f7d..715a833 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,53 @@ +## 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