https://github.com/vtsykun/labs
labs
https://github.com/vtsykun/labs
Last synced: about 1 month ago
JSON representation
labs
- Host: GitHub
- URL: https://github.com/vtsykun/labs
- Owner: vtsykun
- Created: 2016-02-09T09:32:20.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-16T18:49:10.000Z (almost 9 years ago)
- Last Synced: 2025-01-26T08:25:44.216Z (3 months ago)
- Language: JavaScript
- Size: 227 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# simple chat
The simple chat without authorization
====
This application is available at https://jurasikt.pw
## Requirements
- Python > 2.7
- Django > 1.9
- PostgresSQL > 9.1
- Nginx > 1.4.6
- OpenSSL > 1.0.1## Install
### Install the packages from the repositories
```bash
apt-get update
apt-get install postgresql libpq-dev nginx python-pip
```### Install django
```bash
pip install django psycopg2 uwsgi
```## Run project
Create uWSGI config file `nano /var/www/example.com/chat.ini`
```
[uwsgi]
module = chat.wsgi:applicationmaster = true
processes = 3socket = chat.sock
chmod-socket = 664
vacuum = true
```Create nginx virtual hosts. `nano /etc/nginx/sites-enabled/example.com`
```
server {
listen 80;
server_name example.com;location = /favicon.ico {
access_log off;
log_not_found off;
}location ~* \.(?:jpg|jpeg|gif|png|ico)$ {
expires 1M;
access_log off;
add_header Cache-Control "public";
}location ~* \.(?:css|js)$ {
expires 1y;
access_log off;
add_header Cache-Control "public";
}location /static/ {
root /var/www/example.com/;
}location / {
include uwsgi_params;
uwsgi_pass unix:/var/www/example.com/chat.sock;}
```
Run project
```
service nginx restart
chown -R www-data:www-data /var/www/*
cd /var/www/example.com/
uwsgi --ini chat.ini chat.log &
```## Why PostgresSQL not MySQL ?

=====
## Licenses
MIT License