mirror of
https://github.com/codex-team/codex.docs.git
synced 2025-08-08 06:55:26 +02:00
README for docker
This commit is contained in:
parent
40d5285e5e
commit
c10935d0b5
1 changed files with 50 additions and 0 deletions
50
README.md
50
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue