Browse Source

docs: include mount in docker cmds

Signed-off-by: Wing-Kam Wong <wingkwong.code@gmail.com>
pull/1710/head
Wing-Kam Wong 3 years ago
parent
commit
43bb2cf938
  1. 39
      README.md
  2. 17
      packages/noco-docs/content/en/getting-started/installation.md

39
README.md

@ -92,28 +92,37 @@ npm start
```bash ```bash
# for SQLite # for SQLite
docker run -d --name nocodb -p 8080:8080 nocodb/nocodb:latest docker run -d --name nocodb \
-v /local/path:/usr/app/data/ \
-p 8080:8080 \
nocodb/nocodb:latest
# for MySQL # for MySQL
docker run -d -p 8080:8080 \ docker run -d --name nocodb-mysql \
-e NC_DB="mysql2://host.docker.internal:3306?u=root&p=password&d=d1" \ -v /local/path:/usr/app/data/ \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ -p 8080:8080 \
nocodb/nocodb:latest -e NC_DB="mysql2://host.docker.internal:3306?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
# for PostgreSQL # for PostgreSQL
docker run -d -p 8080:8080 \ docker run -d --name nocodb-postgres \
-e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" \ -v /local/path:/usr/app/data/ \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ -p 8080:8080 \
nocodb/nocodb:latest -e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
# for MSSQL # for MSSQL
docker run -d -p 8080:8080 \ docker run -d --name nocodb-mssql \
-e NC_DB="mssql://host.docker.internal:1433?u=root&p=password&d=d1" \ -v /local/path:/usr/app/data/ \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ -p 8080:8080 \
nocodb/nocodb:latest -e NC_DB="mssql://host.docker.internal:1433?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest
``` ```
> To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. In older version mount at `/usr/src/app`. Otherwise your data will be lost after recreating the container. > To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. Otherwise your data will be lost after recreating the container.
> If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for [MySQL Docker](https://github.com/nocodb/nocodb/issues/1340#issuecomment-1049481043). > If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for [MySQL Docker](https://github.com/nocodb/nocodb/issues/1340#issuecomment-1049481043).
@ -133,7 +142,7 @@ cd nocodb/docker-compose/mssql
docker-compose up -d docker-compose up -d
``` ```
> To persist data in docker you can mount volume at `/usr/app/data/` since 0.10.6. In older version mount at `/usr/src/app`. Otherwise your data will be lost after recreating the container. > To persist data in docker, you can mount volume at `/usr/app/data/` since 0.10.6. Otherwise your data will be lost after recreating the container.
> If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for [MySQL Docker Compose](https://github.com/nocodb/nocodb/issues/1313#issuecomment-1046625974). > If you plan to input some special characters, you may need to change the character set and collation yourself when creating the database. Please check out the examples for [MySQL Docker Compose](https://github.com/nocodb/nocodb/issues/1313#issuecomment-1046625974).

17
packages/noco-docs/content/en/getting-started/installation.md

@ -65,7 +65,10 @@ If you are a Docker user, you may try this way!
<code-block label="SQLite" active> <code-block label="SQLite" active>
```bash ```bash
docker run -d --name nocodb -p 8080:8080 nocodb/nocodb:latest docker run -d --name nocodb \
-v /local/path:/usr/app/data/ \
-p 8080:8080 \
nocodb/nocodb:latest
``` ```
</code-block> </code-block>
@ -73,7 +76,9 @@ If you are a Docker user, you may try this way!
<code-block label="MySQL"> <code-block label="MySQL">
```bash ```bash
docker run -d -p 8080:8080 \ docker run -d --name nocodb-mysql \
-v /local/path:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="mysql2://host.docker.internal:3306?u=root&p=password&d=d1" \ -e NC_DB="mysql2://host.docker.internal:3306?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ -e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest nocodb/nocodb:latest
@ -84,7 +89,9 @@ If you are a Docker user, you may try this way!
<code-block label="Postgres"> <code-block label="Postgres">
```bash ```bash
docker run -d -p 8080:8080 \ docker run -d --name nocodb-postgres \
-v /local/path:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" \ -e NC_DB="pg://host.docker.internal:5432?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ -e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest nocodb/nocodb:latest
@ -95,7 +102,9 @@ If you are a Docker user, you may try this way!
<code-block label="SQL Server"> <code-block label="SQL Server">
```bash ```bash
docker run -d -p 8080:8080 \ docker run -d --name nocodb-mssql \
-v /local/path:/usr/app/data/ \
-p 8080:8080 \
-e NC_DB="mssql://host.docker.internal:1433?u=root&p=password&d=d1" \ -e NC_DB="mssql://host.docker.internal:1433?u=root&p=password&d=d1" \
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \ -e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
nocodb/nocodb:latest nocodb/nocodb:latest

Loading…
Cancel
Save