Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add in readmy and sample.env logiс startup celary . rollback ReadMore… #750

Merged
merged 1 commit into from
Sep 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
height: 200px;
flex-shrink: 0;
background: var(--main-grey-20, #DEE1E8);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@
font-weight: 600;
line-height: 20px;
letter-spacing: -0.16px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
align-items: flex-start;
gap: 16px;
min-width: 800px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
font-weight: 400;
line-height: 22px;
letter-spacing: -0.14px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
display: flex;
align-items: flex-start;
gap: 8px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
display: flex;
align-items: flex-start;
gap: 134px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@
font-weight: 400;
line-height: 22px;
letter-spacing: -0.14px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,4 @@
justify-content: space-between;
align-items: center;
min-width: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,4 @@
font-weight: 400;
line-height: 22px;
letter-spacing: -0.14px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ const ReadMore = ({ children }) => {
: false
}
>
<p className={classes['read-more__text']}>
{text}
</p>
{text}
</Paragraph>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
cursor: pointer;
}

.read-more__text,
.read-more {
font-family: var(--font-main);
color: var(--main-grey-90, #25292C);
Expand All @@ -21,4 +20,4 @@
font-weight: 400;
line-height: 22px;
letter-spacing: -0.14px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,4 @@
font-weight: 400;
line-height: 22px;
letter-spacing: -0.14px;
}
}
2 changes: 1 addition & 1 deletion FrontEnd/src/components/ProfileDetail/EmptyData.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
font-weight: 400;
line-height: 22px;
letter-spacing: -0.14px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
position: absolute;
top: 3px;
left: 3px;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
display: flex;
flex-direction: column;
align-items: flex-start;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
height: 1px;
align-self: stretch;
background: var(--primary-green-80, #1F9A7C);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@
gap: 16px;
margin-left: 104px;
margin-right: 104px;
}
}
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,13 +174,39 @@ DEBUG=True or False
ENGINE= # docker-compose.dev.yml
POSTGRES_DB= sample filling => forum # docker-compose
ALLOWED_ENV_HOST=sample filling => "http://localhost:8080" # docker-compose and settings.py
REDIS_URL= sample filling => redis://localhost:6379/0 #local
```
- User, run the local server on port localhost:8000
``` shell
$ python manage.py makemigrations
$ python manage.py migrate
$ python manage.py runserver
```
### Celery and Redis
Correct application operation (in terms of moderation autoapprove functionality, to be precise) requires a running Celery worker and a Redis server. The simplest way to start Redis is:

`docker run --rm -p 6379:6379 redis:7`

Docker will automatically download the image and run the Redis server with the ports exposed. Redis will be available at 127.0.0.1:6379. You should place this host and port in the environment variable REDIS_URL, which Celery uses through Django's settings.py.

Don't forget to install Celery via pip.
```instal
pip install -r requirements.txt
```
Add in BackEnd .env
```.env
REDIS_URL= redis://localhost:6379/0
```

The Celery worker itself needs to be started in a separate terminal (in the directory where manage.py is located) with the command:

`celery -A forum worker --loglevel=info`

On some Windows machines, there might be issues, in that case try:

`celery -A forum worker --loglevel=info -P eventlet`


### Node JS frontend server
- Setup frontend .env
> Setup frontend .env
Expand Down
2 changes: 2 additions & 0 deletions sample.env
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ ENGINE=
POSTGRES_DB=

EMAIL_USE_TLS=

REDIS_URL= redis://localhost:6379/0
Loading