mirror of
https://github.com/sergeyyarkov/educt.git
synced 2026-10-11 10:19:18 +03:00
readme
This commit is contained in:
parent
b9ce437af0
commit
0eca9f4fc2
200
README.md
200
README.md
@ -8,6 +8,8 @@ _All necessary services are started from this repository._
|
|||||||
- [Description](#description)
|
- [Description](#description)
|
||||||
- [Technologies Stack](#technologies-stack)
|
- [Technologies Stack](#technologies-stack)
|
||||||
- [Features](#features)
|
- [Features](#features)
|
||||||
|
- [Installation](#installation)
|
||||||
|
- [Environment variables](#environment-variables)
|
||||||
- [Requirements](#requirements)
|
- [Requirements](#requirements)
|
||||||
- [License](#license)
|
- [License](#license)
|
||||||
|
|
||||||
@ -34,7 +36,8 @@ Educt learning management system (LMS) is an application where you can create an
|
|||||||
- User Authentication
|
- User Authentication
|
||||||
- Chat between users
|
- Chat between users
|
||||||
- User management
|
- User management
|
||||||
- Editing your profile personal data (password, mail, contacts)
|
- Editing your profile personal data (password, e-mail, contacts)
|
||||||
|
- Changing e-mail with verification code
|
||||||
- Deployment with Docker
|
- Deployment with Docker
|
||||||
- Adaptive design
|
- Adaptive design
|
||||||
- Night/Light theme
|
- Night/Light theme
|
||||||
@ -45,9 +48,200 @@ Educt learning management system (LMS) is an application where you can create an
|
|||||||
|
|
||||||
You can see the demo application [here](#). -->
|
You can see the demo application [here](#). -->
|
||||||
|
|
||||||
<!-- ## Installation
|
## Installation
|
||||||
|
|
||||||
--- -->
|
1. Download the project from the git repository
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone --recursive https://github.com/sergeyyarkov/educt.git
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Configure your environment variables in `docker-compose.yml` file in `client` and `api` services. See the [environment variables](#environment-variables) chapter.
|
||||||
|
3. Write your domain name to `default.conf` file in `nginx` folder instead of localhost.
|
||||||
|
4. Build application:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make build
|
||||||
|
```
|
||||||
|
|
||||||
|
5. Start the application and run migrations
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make up
|
||||||
|
make migrate
|
||||||
|
```
|
||||||
|
|
||||||
|
6. Seed database with some data
|
||||||
|
|
||||||
|
```bash
|
||||||
|
make seed
|
||||||
|
```
|
||||||
|
|
||||||
|
The client application is running on port 5000 and the API server is on 3333. You can also use `make logs` to view the logs and `make stop` to stop the application.
|
||||||
|
|
||||||
|
## Environment variables
|
||||||
|
|
||||||
|
Here are the environment variables you may need to set.
|
||||||
|
|
||||||
|
- _🔴 - required_
|
||||||
|
- _🟡 - optional_
|
||||||
|
|
||||||
|
#### 🔴 **API_URL**
|
||||||
|
|
||||||
|
Link to the API server for authentication, obtaining the necessary data and interacting with the system.
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
API_URL=http://api.educt.edu
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🔴 **WS_URL**
|
||||||
|
|
||||||
|
Link to the WebSocket server. Used for chat functionality
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
WS_URL=ws://api.educt.edu
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🔴 **APP_KEY**
|
||||||
|
|
||||||
|
App key is a randomly generated 16 or 32 characters long string required to encrypted cookies, sessions and other sensitive data.
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
APP_KEY=IP387l45rlNO3t7Qgjd89qr-a2G4oUgz
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🔴 **PG_HOST**
|
||||||
|
|
||||||
|
#### 🔴 **PG_USER**
|
||||||
|
|
||||||
|
#### 🔴 **PG_PASSWORD**
|
||||||
|
|
||||||
|
#### 🔴 **PG_DB_NAME**
|
||||||
|
|
||||||
|
This envs required to connect to the database.
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
PG_HOST=postgres
|
||||||
|
PG_PORT=5432
|
||||||
|
PG_USER=postgres
|
||||||
|
PG_PASSWORD=1234
|
||||||
|
PG_DB_NAME=educt
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🔴 **REDIS_HOST**
|
||||||
|
|
||||||
|
#### 🔴 **REDIS_PORT**
|
||||||
|
|
||||||
|
#### 🔴 **REDIS_PASSWORD**
|
||||||
|
|
||||||
|
The Redis server connection is used to store sessions, conversations, chat history, and more.
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
REDIS_HOST=redis
|
||||||
|
REDIS_PORT=6379
|
||||||
|
REDIS_PASSWORD=
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🔴 **MAILER**
|
||||||
|
|
||||||
|
You can choose which mail transfer service to use. Available values: `mailgun` or `smtp`.
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
MAILER=smtp
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🟡 **SMTP_HOST**
|
||||||
|
|
||||||
|
#### 🟡 **SMTP_PORT**
|
||||||
|
|
||||||
|
#### 🟡 **SMTP_USERNAME**
|
||||||
|
|
||||||
|
#### 🟡 **SMTP_PASSWORD**
|
||||||
|
|
||||||
|
SMTP credentials and configuration the server should use to send emails. If you do not want to use SMTP, then do not change the fields and leave them as default
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
SMTP_HOST=smtp.gmail.com
|
||||||
|
SMTP_PORT=587
|
||||||
|
SMTP_USERNAME=example@gmail.com
|
||||||
|
SMTP_PASSWORD=1234
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🟡 **MAILGUN_API_KEY**
|
||||||
|
|
||||||
|
#### 🟡 **MAILGUN_DOMAIN**
|
||||||
|
|
||||||
|
Mailgun is a service that will allow you to send messages. If you do not want to use Mailgun, then do not change the fields and leave them as default
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
MAILGUN_API_KEY=115hd9db10cd10ed682edc01b887efd8-156db0f1-4yd8hd99
|
||||||
|
MAILGUN_DOMAIN=sandbox2717ddf9j8ab6666a508dbb2c0045acb.mailgun.org
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🔴 **DRIVE_DISK**
|
||||||
|
|
||||||
|
Choose where you want to store content for your courses. (video, attached materials, pictures). Available values: `local` or `s3` (Amazon AWS).
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
DRIVE_DISK=local
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
#### 🟡 **S3_KEY**
|
||||||
|
|
||||||
|
#### 🟡 **S3_SECRET**
|
||||||
|
|
||||||
|
#### 🟡 **S3_BUCKET**
|
||||||
|
|
||||||
|
#### 🟡 **S3_REGION**
|
||||||
|
|
||||||
|
Enter data to connect to Amazon AWS cloud storage. If you do not want to use Amazon AWS, then do not change the fields and leave them as default
|
||||||
|
|
||||||
|
_Example:_
|
||||||
|
|
||||||
|
```text
|
||||||
|
S3_KEY=CJIB4ASE6I9IKSGV7KHI
|
||||||
|
S3_SECRET=2vHfGE+TBMqVKxkjBohBqGwWcE01SclXf5YJIXbs
|
||||||
|
S3_BUCKET=example
|
||||||
|
S3_REGION=eu-central-1
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ services:
|
|||||||
- API_URL=http://api.localhost
|
- API_URL=http://api.localhost
|
||||||
- WS_URL=ws://api.localhost
|
- WS_URL=ws://api.localhost
|
||||||
ports:
|
ports:
|
||||||
- 5000:5000
|
- 5000
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
networks:
|
networks:
|
||||||
@ -37,7 +37,7 @@ services:
|
|||||||
target: production
|
target: production
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 3333:3333
|
- 3333
|
||||||
environment:
|
environment:
|
||||||
- PORT=3333
|
- PORT=3333
|
||||||
- APP_KEY=IP387l45rlNO3t7Qgjd89qr-a2G4oUgz
|
- APP_KEY=IP387l45rlNO3t7Qgjd89qr-a2G4oUgz
|
||||||
@ -51,6 +51,7 @@ services:
|
|||||||
- REDIS_HOST=redis
|
- REDIS_HOST=redis
|
||||||
- REDIS_PORT=6379
|
- REDIS_PORT=6379
|
||||||
- REDIS_PASSWORD=
|
- REDIS_PASSWORD=
|
||||||
|
- MAILER=smtp
|
||||||
- SMTP_HOST=localhost
|
- SMTP_HOST=localhost
|
||||||
- SMTP_PORT=587
|
- SMTP_PORT=587
|
||||||
- SMTP_USERNAME=<username>
|
- SMTP_USERNAME=<username>
|
||||||
@ -80,7 +81,7 @@ services:
|
|||||||
POSTGRES_PASSWORD: 1234
|
POSTGRES_PASSWORD: 1234
|
||||||
POSTGRES_DB: educt
|
POSTGRES_DB: educt
|
||||||
ports:
|
ports:
|
||||||
- 5432:5432
|
- 5432
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
redis:
|
redis:
|
||||||
@ -89,7 +90,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- redis_volume:/data
|
- redis_volume:/data
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 6379
|
||||||
networks:
|
networks:
|
||||||
- app-network
|
- app-network
|
||||||
depends_on:
|
depends_on:
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
Subproject commit d366c05d559b46f80193096d66b287883cfea3c4
|
Subproject commit 7d9a9f7d198c4c2d912e86ad64416a7f9af2effb
|
||||||
@ -1 +1 @@
|
|||||||
Subproject commit 5171f654296b488d6d9702bf3ed2d687904e8486
|
Subproject commit 294a4f584dd39d295372802305004365fb01fdb2
|
||||||
Loading…
x
Reference in New Issue
Block a user