1
0
Fork 0
mirror of https://github.com/codex-team/codex.docs.git synced 2025-08-08 15:05:26 +02:00

README for docker

This commit is contained in:
N0str 2021-05-25 15:12:57 +03:00
parent 40d5285e5e
commit c10935d0b5
No known key found for this signature in database
GPG key ID: 9141CB6BB5A35140

View file

@ -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