Skip to content

instructions for dev setup #76

@steveharoz

Description

@steveharoz

EDIT: I've updated these commands based on the advice below. It works with a new Digital Ocean instance of Ubuntu.

Update and upgrade the packages:

apt-get update
apt-get -y upgrade

Install nginx:
apt-get install -y nginx

Install supervisor:
apt-get install -y supervisor

Install python virtualenv:
apt-get install -y python-virtualenv

Install postgresql:
apt-get install -y postgresql postgresql-contrib

get project:
git clone https://github.com/steveharoz/curate_science.git

make curate_science/.env file:

DB_USER=sharoz
DB_PASS=mypassword
SECRET_KEY=somerandomkey

setup virtual environment

virtualenv curate_science --python=$(which python3.5)
source curate_science/bin/activate
cd curate_science

Switch to the postgres user:
sudo su - postgres

Type this to go to the postgres interactive shell:
psql

Create a database and set up user:

CREATE DATABASE curate;
CREATE USER [DB_USER] WITH PASSWORD '[DB_PASS]';
GRANT ALL PRIVILEGES ON DATABASE curate TO [DB_USER];
ALTER USER [DB_USER] CREATEDB;

Quit from the shell and switch back to the root user:

postgres=# \q
postgres@djtrump:~$ exit

Set up server:

pip install -r requirements.txt
python manage.py migrate

tools to generate html/js

apt install npm
npm install -g yarn
npm install webpack

(reopen terminal)

source curate_science/bin/activate
cd curate_science
yarn start
[type ctrl + c after it finishes]

start the server

source curate_science/bin/activate
cd curate_science
python manage.py runserver [::]:8000

Go to [your machine's ip]:8000

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions