Update installation instructions
This commit is contained in:
parent
dd93f94f3a
commit
ca0bd47ed8
38
README.md
38
README.md
@ -11,17 +11,27 @@ It's based on the availibity of all participants for specific days.
|
|||||||
- [Flowchart](https://app.diagrams.net/#Uhttps://git.armada.digital/meeting-planner/documentation/raw/branch/master/meetingscheduler.drawio)
|
- [Flowchart](https://app.diagrams.net/#Uhttps://git.armada.digital/meeting-planner/documentation/raw/branch/master/meetingscheduler.drawio)
|
||||||
|
|
||||||
|
|
||||||
## Backend installation
|
## Installation
|
||||||
|
|
||||||
### 1 | Create a database on Postgres
|
### 0 | Requirements
|
||||||
Any up to date postgres should work.
|
Meeting Planner runs on virtually any system where Node.js is supported.
|
||||||
You will need the following informations:
|
This means it runs on Linux, macOS, Windows as well as container solutions such as Docker / Kubernetes and Heroku.
|
||||||
- username
|
|
||||||
- password
|
|
||||||
- hostname
|
|
||||||
- database
|
|
||||||
|
|
||||||
### 2 | Create and/or configure an `.env` file
|
**Versions**
|
||||||
|
- Postgres 9.5 or later
|
||||||
|
- NodeJS 10.12 or later
|
||||||
|
|
||||||
|
*[KnexJS](https://knexjs.org/), the database driver used is compatible with other databases like MySQL.
|
||||||
|
With small adaptation, it should be possible to use them, but this has not been tested.*
|
||||||
|
|
||||||
|
### 1 | Configure Postgres to use UTC
|
||||||
|
|
||||||
|
** Make sure that Postgres database used is configured to UTC **
|
||||||
|
`SET TIME ZONE 'UTC';`
|
||||||
|
|
||||||
|
See [Postgres Documentation](https://www.postgresql.org/docs/current/sql-set.html)
|
||||||
|
|
||||||
|
### 2 | Create and/or configure environement variables
|
||||||
|
|
||||||
- Create a `.env` file at the root of the backend folder
|
- Create a `.env` file at the root of the backend folder
|
||||||
- Replace all variables noted with `$` below, and save it to the `.env` file
|
- Replace all variables noted with `$` below, and save it to the `.env` file
|
||||||
@ -32,17 +42,17 @@ PORT=$port_number
|
|||||||
DATABASE_URL=postgres://$db_user:$db_user_password@$hostname:5432/$db_name
|
DATABASE_URL=postgres://$db_user:$db_user_password@$hostname:5432/$db_name
|
||||||
JWT_SECRET=$long_random_characters
|
JWT_SECRET=$long_random_characters
|
||||||
```
|
```
|
||||||
### 3 | Installation of packages (NodeJS needs to be installed)
|
### 3 | Installation of packages with npm
|
||||||
- `npm i`
|
- `npm i`
|
||||||
|
|
||||||
### Migrate tables to database
|
### 4 | Migrate tables to database
|
||||||
- `npx knex migrate:latest`
|
- `npx knex migrate:latest`
|
||||||
|
|
||||||
### Seed database with dummy content (optional)
|
### 5 | Seed database with dummy content **(optional)**
|
||||||
Running this will add some users and meetings.
|
Running this will add some accounts along with some meetings.
|
||||||
- `npx knex seed:run`
|
- `npx knex seed:run`
|
||||||
|
|
||||||
**List of users**
|
**Accounts created**
|
||||||
|
|
||||||
| Liza | Emile | Jack | Cynthia | Celine |
|
| Liza | Emile | Jack | Cynthia | Celine |
|
||||||
| :--------------- | :---------------- | :--------------- | :------------------ | :----------------- |
|
| :--------------- | :---------------- | :--------------- | :------------------ | :----------------- |
|
||||||
|
Loading…
Reference in New Issue
Block a user