Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/dcunhas/agdss
Browse files Browse the repository at this point in the history
  • Loading branch information
darknight-007 committed Jan 16, 2018
2 parents 0f933b0 + 1ff6588 commit cec14e3
Showing 1 changed file with 8 additions and 28 deletions.
36 changes: 8 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,34 +4,14 @@


##Setup
1. Required software:
* Python2 (Python3 untested) with packages NumPy, Pillow, Wand, and django-adminplus
* Django* < 1.10 (django 1.10 no longer allows you to specify urls as string, http://stackoverflow.com/questions/38744285/django-urls-error-view-must-be-a-callable-or-a-list-tuple-in-the-case-of-includ)
* * pip install django==1.9
* Postgres (or other database, though using another database requires changing code). Set port to 5432 (or change code to reflect chosen port). (Setup information: [here](https://help.ubuntu.com/community/PostgreSQL))
* psycopg2 (required for Postgres)
* ImageMagick (`ImageMagick 6.7.7-10 Q16` and `ImageMagick-6.9.4 Q16` are known to be working and compatible versions)
(Tarball for previous versions can be found [here](https://www.imagemagick.org/download/releases/))
2. Clone this repo (and navigate to it).
3. Create a (Postgres) database called `agdss` which has a user `aguser` with a password `aguser` (with all permissions). To change these configurations, see `DATABASE` in aguser/settings.py. The easiest way to do this is through a GUI manager like pgadmin3. However, it can be done via the Unix terminal.
* If on Windows, one may be required to create a Firewall inbound rule allowing traffic on port 5432 as it is closed by default. This may not be necessary, but attempt if there is a problem.
* To do this in the terminal, follow the setup information [here](https://help.ubuntu.com/community/PostgreSQL). Afterwords, to create the user, run `sudo -u postgres psql` to enter the postgres prompt. There, run `CREATE USER aguser WITH PASSWORD 'aguser';` followed by `GRANT ALL PRIVILEGES ON DATABASE "agdss" to aguser;`.
* DB setup on MacOSX:
psql postgres
CREATE DATABASE agdss;
CREATE USER aguser WITH PASSWORD 'aguser';
GRANT ALL PRIVILEGES ON DATABASE "agdss" to aguser;



5. Run `python manage.py migrate --settings=agdss.settings.prod` to create the tables in the database.
6. To create admin credentials (required to access /admin), run `python manage.py createsuperuser` and enter the requested information.
7. Create a new settings file under '\agdss\settings'. Copy the settings from prod.py and change the `STATIC_ROOT` to point at
a local directory you want the server to access.
8. TEMPORARY: Set `STATIC_ROOT` to parent directory of images (in agdss/settings.py).
9. TEMPORARY: Place all images directly in directory named `tag_images` which is a child of the `STATIC_ROOT` directory. (The images MUST be in a subfolder for this to work!)
10. To start server, run `python manage.py runserver --settings=agdss.settings.[your settings]`.
11. The webapp can then be accessed at [http://localhost:8000](http://localhost:8000). For a list of available pages, see the file agdss/urls.py.
1. git clone https://github.com/dcunhas/agdss
2. cd agdss
3. docker-compose up

##Additional steps needed in agdss web container, the first time for a composition
1. Run `python manage.py migrate --settings=agdss.settings.common` to create the tables in the database.
2. To create admin credentials (required to access /admin), run `python manage.py createsuperuser` and enter the requested information.
3. The webapp can then be accessed at [http://172.10.0.3:8000](http://172.10.0.3:8000). For a list of available pages, see the file agdss/urls.py.


##Adding Images
Expand Down

0 comments on commit cec14e3

Please sign in to comment.