SciPost Code Repository

Skip to content
Snippets Groups Projects
Commit 45f602ee authored by Jean-Sébastien Caux's avatar Jean-Sébastien Caux
Browse files

De-mongo the README

parent 55b188bf
No related branches found
No related tags found
No related merge requests found
...@@ -19,41 +19,6 @@ higher. Python dependencies are listed in `requirements.txt`. Frontend dependenc ...@@ -19,41 +19,6 @@ higher. Python dependencies are listed in `requirements.txt`. Frontend dependenc
Make sure that PostgreSQL is installed and running and that a database with user is set up. A Make sure that PostgreSQL is installed and running and that a database with user is set up. A
good guide how to do this can be found [here](https://djangogirls.gitbooks.io/django-girls-tutorial-extensions/content/optional_postgresql_installation/) (NOTE: stop before the 'Update settings' part). good guide how to do this can be found [here](https://djangogirls.gitbooks.io/django-girls-tutorial-extensions/content/optional_postgresql_installation/) (NOTE: stop before the 'Update settings' part).
#### MongoDB
The metacore part of the project runs on a [MongoDB database](https://docs.mongodb.com/manual/installation/). Make sure to install a MongoDB as well. Eg. on MacOS:
```shell
$ brew update
$ brew install mongodb
```
After installing, create the database:
```shell
$ mongo
> use <database>
switched to db <database>
```
To create a user for the database:
```shell
> db.createUser({
user: "<name>",
pwd: "<cleartext password>",
roles: [{ role: "readWrite", db: "<database>" }]
})
```
The following MongoDB configuration is set by default, you may overwrite it in your local settings:
```python
MONGO_DATABASE = {
'database': 'scipost',
'host': 'localhost',
'user': '',
'password': '',
'port': '27017',
}
```
### Python version ### Python version
Make sure you're using Python 3.5. You are strongly encouraged to use a [virtual environment](https://docs.python.org/3.5/library/venv.html). Make sure you're using Python 3.5. You are strongly encouraged to use a [virtual environment](https://docs.python.org/3.5/library/venv.html).
...@@ -413,7 +378,7 @@ This view may be used as a [generic editing view](https://docs.djangoproject.com ...@@ -413,7 +378,7 @@ This view may be used as a [generic editing view](https://docs.djangoproject.com
This view is a basic class-based view, which may be used as basic editor for a specific templated email. This view is a basic class-based view, which may be used as basic editor for a specific templated email.
##### Attributes ##### Attributes
* `mail_code` {string} * `mail_code` {string}
> The unique code refereeing to a template and configuration file. > The unique code refereeing to a template and configuration file.
...@@ -603,20 +568,3 @@ Note: on the staging server, these commands are contained in two shell scripts i ...@@ -603,20 +568,3 @@ Note: on the staging server, these commands are contained in two shell scripts i
```bash ```bash
./start_celery.sh ./start_celery.sh
``` ```
## Metacore (still in development)
The Metacore app for citables, sourced - for now only - from Crossref, is available at /metacore.
In order to get it running on the server (right now implemented on staging), the following things need to be running:
First of all the Mongo daemon (staging server):
```bash
/home/scipoststg/webapps/mongo/mongodb-linux-x86_64-amazon-3.6.3/bin/mongod --auth --dbpath /home/scipoststg/webapps/mongo/data --port 21145 --logpath /home/scipoststg/webapps/scipost/logs/mongod.log --fork
```
### Indexing
The search methods use the mongo text index for authors/title. They are defined through
the mongo shell. Execute the following in the mongo shell:
```bash
use scipost
db.citable.createIndex({authors: "text", title: "text", journal: "text"})
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment