Skip to content

Commit d8c5ffe

Browse files
authored
Merge pull request #336 from haystack/2067bcf2_recovery
2067bcf recovery
2 parents 6bec739 + 2067bcf commit d8c5ffe

File tree

132 files changed

+53831
-8200
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+53831
-8200
lines changed

.env.example

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
# Please enter your gmail username and password
2-
# Also enable insecure logins
1+
# Please enter your gmail address
2+
# Also create an gmail app password
33
4-
GMAIL_PASSWORD=YOU_GMAIL_PASSWORD
4+
GMAIL_PASSWORD=YOUR_APP_PASSWORD
55

66

77

@@ -17,6 +17,7 @@ GMAIL_PASSWORD=YOU_GMAIL_PASSWORD
1717
DATABASE_NAME=murmur
1818
MYSQL_PASS=murmurdb
1919
DATABASE_HOST=db
20+
GMAIL_PORT=587
2021

2122
# domain name used for sending emails
2223
DOMAIN_NAME=localhost:8000

README.md

Lines changed: 12 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
11

2-
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/haystack/murmur?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Django version](https://img.shields.io/badge/Django-1.7-blue)](https://docs.djangoproject.com/en/3.0/releases/1.7/) [![python version](https://img.shields.io/badge/python-2.7-yellowgreen.svg)](https://www.python.org/download/releases/2.7/)
2+
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/haystack/murmur?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) [![Django version](https://img.shields.io/badge/Django-1.10-blue)](https://docs.djangoproject.com/en/3.0/releases/1.10/) [![python version](https://img.shields.io/badge/python-2.7-yellowgreen.svg)](https://www.python.org/download/releases/2.7/)
33

44
Murmur
55
=
66

77
Murmur uses Django with a MySQL backend (you can replace with any other backend Django supports). For email, we use postfix along with the python lamson library.
88

9-
#### Private File
10-
11-
Please contact us for an example of the private file. You cannot run the program without it.
12-
13-
#### Install MySQL Server
14-
15-
#### setup the database
16-
* change the root mysql account to one written in private file.
17-
* make sure you can log in to mysql with the password in the command line: `mysql -u root -p`
18-
199
#### Install Git and clone this repository
2010
* `git clone https://github.com/haystack/murmur.git`
2111

@@ -29,89 +19,25 @@ Please contact us for an example of the private file. You cannot run the program
2919

3020
To install the Docker Engine select your [Linux distribution](https://docs.docker.com/engine/install/#server) and follow the instructions to install.
3121

32-
Currently you need a gmail account in order for Murmur to send verification emails, such as registration confirmation. In order for Murmur to log in to your gmail account you need to [enable less secure logins](https://support.google.com/accounts/answer/6010255?hl=en).
22+
Currently you need a gmail account in order for Murmur to send verification emails, such as registration confirmation.
3323

3424
Next set up the environment variables. The only variables you should need to set are your gmail username and password.
3525

3626
1. `cp .env.example .env`
37-
2. Fill in the correct values in `.env` for your gmail account. Make sure to enable insecure logins on gmail.
38-
3. Use `make` to create the database and create a superuser account to login
39-
4. Check it out on `localhost:8000
40-
41-
#### Starting and Stopping Docker
42-
43-
In order to stop docker you can simply run `make stop` and run `make start` to start it up again.
44-
45-
## Not Running Docker i.e. on the server
46-
47-
#### install required linux packages if on linux
48-
* `sudo apt-get install libmysqlclient-dev python-dev`
49-
50-
#### install virtualenv and python packages
51-
* `/usr/bin/python2.7`
52-
* pip: `sudo easy_install pip`
53-
* `sudo pip install virtualenv `
54-
* create a virtualenv for this project: `virtualenv murmur-env`
55-
* make sure your virtualenv is activated: `source murmur-env/bin/activate`
56-
57-
#### install required python packages
58-
* `pip install mysql-python`
59-
* `pip install -r requirements.txt`
60-
61-
#### configuration
62-
* edit database details in a new file called private.py. http_handler/settings.py looks for this file to populate database information:
63-
`MYSQL_LOCAL = {
64-
'NAME': 'murmur',
65-
'USER': 'admin',
66-
'PASSWORD': 'password',
67-
'HOST': 'localhost'
68-
}`
69-
* also in this private.py file, add your Amazon S3 settings:
70-
* `AWS_STORAGE_BUCKET_NAME = 'bucket-name-goes-here'`
71-
* `AWS_ACCESS_KEY_ID = 'key-goes-here'`
72-
* `AWS_SECRET_ACCESS_KEY = 'secret-key-goes-here'`
73-
* create file /opt/murmur/env with single word containing "dev", "staging", or "prod" for the type of server you are setting up
74-
* create file /opt/murmur/debug with single word containing "true" or "false" to turn on debug mode
75-
* edit file /opt/murmur/website with single word containing "murmur" or "squadbox" to direct to the respective landing page
76-
* If using Google integration, create a Google API project and enable the Gmail, People and Contacts APIs; generate an Oauth2 client_secrets.json file for this project and put this in the /gmail_setup/ directory
77-
* Run [this command](https://github.com/haystack/murmur/blob/master/mysql_encoding) at mysql
27+
2. Fill in the correct values in `.env` for your gmail account. Put your gmail address and a google app password.
28+
3. `cp private.py.example private.py`
29+
4. Fill in the correct values in `private.py` such as your AWS IDs for message-attachment storage.
30+
5. Use `make` to create the database and create a superuser account to login
31+
6. Check it out on `localhost:8000`
7832

7933
#### setup the database
80-
* `mysql -u root -p`
81-
* `create database murmur;`
82-
* Give privileges to the user that will access the database from django: `grant all privileges ON murmur.* TO root@localhost;`
83-
84-
#### install schema and create superuser
85-
* `python manage.py syncdb`and create superuser
86-
* Convert schema app to be managed by South: `python manage.py schemamigration schema --initial`
87-
* Then do fake migration: `python manage.py migrate schema 0001 --fake`
88-
89-
#### run murmur server
90-
* Webserver: `python manage.py runserver 0.0.0.0:8000` (check [here](https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-apache-and-mod_wsgi-on-ubuntu-16-04) for details)
91-
92-
### Email Instructions
93-
94-
Setting for relay & outgoing server is in `config/settings.py` (Double check you open firewall for the ports)
95-
96-
#### Postfix setting (if you are using postfix as a relay system)
34+
* change the root mysql account to one written in `.env`
35+
* make sure you can log in to mysql with the password in the command line: `mysql -u root -p`
9736

98-
If you are using Postfix, you should update two postfix files:
9937

100-
1. `master.cf`: add a line `RELAY_PORT_YOU_SPECIFIED_at_config/settings.py inet n - n - - smtpd`
101-
2. `main.cf`:
102-
```
103-
mydestination =
104-
local_recipient_maps =
105-
local_transport = error: local mail delivery disabled
106-
relay_domains = YOUR DOMAIN NAME
107-
relay_transport = smtp:127.0.0.1:[RECEIVER PORT YOU SPECIFIED at config/settings.py]
108-
```
38+
#### Starting and Stopping Docker
10939

110-
Then reboot Postfix.
40+
In order to stop docker you can simply run `make stop` and run `make start` to start it up again.
11141

112-
#### run murmur server
113-
* If running email server: `lamson start`
114-
+ ⚠️ If it is not running without any error msg or throws `connection refused` error, then check your email port being used by other services (e.g., `netstat -peanut | grep ":8825"`) and check logs at logs/lamson.err. If the port is being used, use another port or kill the process using the port.
11542

116-
#### enable daily digest feature
117-
* `crontab -e` and add a line `0 */24 * * * python ABSOLUTE_DIRECTORY/manage.py digest`
43+
If you want to deploy Murmur on your own server and domain, check out the [advanced settings](https://github.com/haystack/murmur/wiki/Advanced-set-up:-server-deployment)

browser/templates/mobile_list_groups.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ <h3>My {{ group_or_squad | title }}s</h3>
1818
{% endif %}
1919
</div>
2020

21-
<ul id="post-list-table">
21+
<ul id="group-list-table">
2222
{% for group, link in pairs %}
2323
{% if website == 'murmur' %}
2424
<a href="/groups/{{ group.name }}">
@@ -28,7 +28,7 @@ <h3>My {{ group_or_squad | title }}s</h3>
2828
<li class="row-item" id="{{ group.name }}">
2929
<span class="strong">{{ group.name }}</span>
3030
{% if group.admin %}
31-
<span class="admin label">
31+
<span class="admin label text-light rounded-sm">
3232
{% if website == 'murmur' %}
3333
Admin
3434
{% elif website == 'squadbox' %}
@@ -37,7 +37,7 @@ <h3>My {{ group_or_squad | title }}s</h3>
3737
</span>
3838
{% endif %}
3939
{% if group.mod %}
40-
<span class="mod label">
40+
<span class="mod label text-light rounded-sm">
4141
{% if website == 'murmur' %}
4242
Mod
4343
{% elif website == 'squadbox' %}

browser/templates/murmur/about.html

Lines changed: 26 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -14,62 +14,44 @@
1414

1515
{% block content %}
1616

17-
{% if flavour != "mobile" %}
1817
<div class="container-home">
19-
{% else %}
20-
<div class="container">
21-
{% endif %}
22-
{% if flavour != "mobile" %}
2318
<div class="home-left">
24-
{% else %}
25-
<div class="home-left-mobile">
26-
{% endif %}
27-
28-
29-
<h4>We're re-imagining mailing lists and community discourse for the age of social media.</h4>
30-
31-
Murmur is a new tool for group communication that blends concepts from mailing lists, forums, and social media.
32-
Now members can choose how they receive emails and collaboratively moderate discussion.
33-
<br /><br />
34-
Murmur is a research project from the <a href="http://haystack.csail.mit.edu">Haystack Group</a> at <a href="http://csail.mit.edu">MIT CSAIL</a>.
35-
<br />
36-
<br />
19+
<h4>We're re-imagining mailing lists and community discourse for the age of social media.</h4>
20+
<p>Murmur is a new tool for group communication that blends concepts from mailing lists, forums, and social media.
21+
Now members can choose how they receive emails and collaboratively moderate discussion.</p>
22+
<p>Murmur is a research project from the <a href="http://haystack.csail.mit.edu">Haystack Group</a> at <a href="http://csail.mit.edu">MIT CSAIL</a>.</p>
3723

3824

39-
<h4>Publications</h4>
40-
Amy X. Zhang, Mark S. Ackerman, David R. Karger.
41-
<span class="strong">Mailing Lists: Why Are They Still Here, What’s Wrong With Them, and How Can We Fix Them?</span>
42-
In Proceedings of the ACM Conference on Human Factors in Computing Systems
43-
(CHI 2015). Seoul, Korea. April 2015. <br />
44-
<a href="http://people.csail.mit.edu/axz/papers/mailinglists.pdf"><button class="btn btn-xs">PDF</button></a>
45-
<a href="http://people.csail.mit.edu/axz/mailinglists.html"><button class="btn btn-xs">Slides</button></a>
46-
<a href="http://haystack.csail.mit.edu/blog/2015/05/05/mailing-lists-why-are-they-still-here-whats-wrong-with-them-and-how-can-we-fix-them/"><button class="btn btn-xs">Blog Post</button></a>
47-
48-
49-
<br />
50-
<br />
51-
<h4>Code</h4>
52-
Check out our <a href="https://github.com/haystack/murmur">Github page</a> to run your own version, report an issue, see what we're currently
53-
working on, or get involved!
54-
<br />
55-
<br />
56-
<br />
57-
Still curious about Murmur? Then
58-
<a href="/group_list">explore some public groups</a>!
25+
<h4>Publications</h4>
26+
<div class="d-inline-block mb-2">
27+
<span>Amy X. Zhang, Mark S. Ackerman, David R. Karger.</span>
28+
<span class="strong">Mailing Lists: Why Are They Still Here, What’s Wrong With Them, and How Can We Fix Them?</span>
29+
<span>In Proceedings of the ACM Conference on Human Factors in Computing Systems
30+
(CHI 2015). Seoul, Korea. April 2015.</span>
31+
</div>
32+
33+
<a href="http://people.csail.mit.edu/axz/papers/mailinglists.pdf"><button class="btn btn-xs btn-primary">PDF</button></a>
34+
<a href="http://people.csail.mit.edu/axz/mailinglists.html"><button class="btn btn-xs btn-primary">Slides</button></a>
35+
<a href="http://haystack.csail.mit.edu/blog/2015/05/05/mailing-lists-why-are-they-still-here-whats-wrong-with-them-and-how-can-we-fix-them/"><button class="btn btn-xs btn-primary">Blog Post</button></a>
36+
37+
38+
<br />
39+
<br />
40+
<h4>Code</h4>
41+
<p>Check out our <a href="https://github.com/haystack/murmur">Github page</a> to run your own version, report an issue, see what we're currently
42+
working on, or get involved!</p>
43+
<p>Still curious about Murmur? Then
44+
<a href="/group_list">explore some public groups</a>!</p>
45+
5946

6047

6148

6249

6350
</div>
6451

6552

66-
{% if flavour != "mobile" %}
6753
<div class="home-right">
68-
{% else %}
69-
<div class="home-right-mobile">
70-
{% endif %}
71-
72-
54+
7355
<div style="text-align: center;">
7456
<h4>Our Research Team</h4>
7557
<img class="img-circle" src="https://raw.githubusercontent.com/haystack/website/master/images/people/KakaoTalk_Photo_2017-11-22-17-47-17.jpeg" width=70><BR>

0 commit comments

Comments
 (0)