mirror of https://github.com/nocodb/nocodb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
185 lines
3.9 KiB
185 lines
3.9 KiB
3 years ago
|
---
|
||
|
title: 'Setup and Usages'
|
||
|
description: 'Simple installation - takes about three minutes!'
|
||
3 years ago
|
position: 2
|
||
|
category: 'Getting started'
|
||
3 years ago
|
menuTitle: 'Installation'
|
||
|
link: https://codesandbox.io/embed/vigorous-firefly-80kq5?hidenavigation=1&theme=dark
|
||
|
---
|
||
|
|
||
3 years ago
|
Simple installation - takes about three minutes!
|
||
3 years ago
|
|
||
3 years ago
|
## Prerequisites
|
||
3 years ago
|
|
||
|
- __Must haves__
|
||
|
* [node.js >= 12](https://nodejs.org/en/download) / [Docker](https://www.docker.com/get-started)
|
||
|
* [MySql](https://dev.mysql.com/downloads/mysql/) / [Postgres](https://www.postgresql.org/download/) / [SQLserver](https://www.microsoft.com/en-gb/sql-server/sql-server-downloads) / SQLite Database
|
||
|
- Nice to haves
|
||
|
- Existing schemas can help to create APIs quickly.
|
||
3 years ago
|
- An example database schema can be found <a class="grey--text" href="https://github.com/lerocha/chinook-database/tree/master/ChinookDatabase/DataSources"> <u>here</u></a>.
|
||
3 years ago
|
|
||
|
## Quick try
|
||
3 years ago
|
|
||
|
### 1-Click Deploy to Heroku
|
||
|
|
||
3 years ago
|
<a href="https://heroku.com/deploy?template=https://github.com/npgia/nocodb-seed-heroku">
|
||
|
<img
|
||
|
src="https://www.herokucdn.com/deploy/button.svg"
|
||
|
width="300px"
|
||
|
alt="Deploy NocoDB to Heroku with 1-Click"
|
||
|
/>
|
||
|
</a>
|
||
|
|
||
3 years ago
|
### Node app / Docker
|
||
3 years ago
|
|
||
|
|
||
|
<code-group>
|
||
|
<code-block label="NPX" active>
|
||
|
|
||
|
```bash
|
||
|
npx create-nocodb-app
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
|
||
|
<code-block label="Docker" >
|
||
|
|
||
|
```bash
|
||
|
docker run -d --name nocodb -p 8080:8080 nocodb/nocodb
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
|
||
|
<code-block label="Using Git" >
|
||
|
|
||
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb-seed
|
||
|
cd nocodb-seed
|
||
|
npm install
|
||
|
npm start
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
</code-group>
|
||
|
|
||
3 years ago
|
## Local Setup
|
||
|
|
||
3 years ago
|
If you want to modify the source code,
|
||
3 years ago
|
|
||
3 years ago
|
- Start the backend locally
|
||
3 years ago
|
|
||
|
```bash
|
||
|
cd packages/nocodb
|
||
|
npm install
|
||
|
npm run watch:run
|
||
|
```
|
||
|
|
||
3 years ago
|
- Start the frontend locally
|
||
3 years ago
|
|
||
|
```bash
|
||
|
cd packages/nc-gui
|
||
|
npm install
|
||
|
npm run dev
|
||
|
```
|
||
|
|
||
3 years ago
|
- Open ``localhost:3000/dashboard`` in browser
|
||
3 years ago
|
|
||
3 years ago
|
<alert>
|
||
|
nocodb/packages/nocodb includes nc-lib-gui which is the built version of nc-gui hosted in npm registry. <br>
|
||
|
You can visit localhost:8000/dashboard in browser after starting the backend locally if you just want to modify the backend only.
|
||
|
</alert>
|
||
3 years ago
|
|
||
|
## Production Setup
|
||
|
|
||
3 years ago
|
NocoDB requires a database to store metadata of spreadsheets views and external databases.
|
||
|
And connection params for this database can be specified in `NC_DB` environment variable.
|
||
|
|
||
3 years ago
|
### Docker
|
||
3 years ago
|
|
||
|
<code-group>
|
||
|
<code-block label="MySQL" active>
|
||
|
|
||
|
```bash
|
||
|
docker run -d -p 8080:8080 \
|
||
|
-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
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
|
||
|
<code-block label="Postgres">
|
||
|
|
||
|
```bash
|
||
|
docker run -d -p 8080:8080 \
|
||
|
-e NC_DB="pg://host:port?u=user&p=password&d=database" \
|
||
|
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
|
||
|
nocodb/nocodb
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
|
||
|
<code-block label="SQL Server">
|
||
|
|
||
|
```bash
|
||
|
docker run -d -p 8080:8080 \
|
||
|
-e NC_DB="mssql://host:port?u=user&p=password&d=database" \
|
||
|
-e NC_AUTH_JWT_SECRET="569a1821-0a93-45e8-87ab-eb857f20a010" \
|
||
|
nocodb/nocodb
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
</code-group>
|
||
|
|
||
3 years ago
|
### Docker Compose
|
||
3 years ago
|
|
||
|
<code-group>
|
||
|
<code-block label="MySQL" active>
|
||
|
|
||
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb
|
||
|
cd docker-compose
|
||
|
cd mysql
|
||
|
docker-compose up
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
|
||
|
<code-block label="Postgres">
|
||
|
|
||
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb
|
||
|
cd docker-compose
|
||
|
cd pg
|
||
|
docker-compose up
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
|
||
|
<code-block label="SQL Server">
|
||
|
|
||
|
```bash
|
||
|
git clone https://github.com/nocodb/nocodb
|
||
|
cd docker-compose
|
||
|
cd mssql
|
||
|
docker-compose up
|
||
|
```
|
||
|
|
||
|
</code-block>
|
||
|
</code-group>
|
||
|
|
||
|
### Sample app
|
||
|
<code-sandbox :src="link"></code-sandbox>
|
||
|
|
||
3 years ago
|
## Sample Demos
|
||
3 years ago
|
|
||
|
### Docker deploying with one command
|
||
|
|
||
|
<youtube id="K-UEecQyiOk"></youtube>
|
||
|
|
||
|
### Using NPX
|
||
|
|
||
|
<youtube id="v6Nn75P1p7I"></youtube>
|
||
|
|
||
|
### Heroku Deployment
|
||
|
<youtube id="v6Nn75P1p7I"></youtube>
|