forked from jhuopensource/semesterly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-dev.txt
More file actions
49 lines (40 loc) · 1.66 KB
/
docker-dev.txt
File metadata and controls
49 lines (40 loc) · 1.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Developing Semester.ly on Docker
Steps are below on getting your local development environment running:
* Download and install docker for your environment (Windows/Mac/Linux are supporter): https://www.docker.com/get-started
* Clone this repository
* Create semesterly/local_settings.py as follows:
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'postgres',
'USER': 'postgres',
'PASSWORD': '',
'HOST': 'db',
'PORT': '5432',
}
}
* Edit semesterly/dev_credentials.py and add a value for JHU_API_KEY in single quotes like below. You can get this from sis.jhu.edu/api
'JHU_API_KEY': 'xxxxxxxx',
* add entry to your hosts file as follows (This file is in c:\Windows\System32\drivers\etc\hosts or /etc/hosts)
127.0.0.1 sem.ly jhu.sem.ly
Launch terminal or a command window and run:
* docker-compose build
* docker-compose up
You now have semesterly running. If this is the first time, you will want some data.
Getting JHU data for a given term
* In a new terminal run the following
docker exec -it $(docker ps -q -f ancestor=semesterly) /bin/bash
* OR
docker exec -it $(docker ps -q -f ancestor=semesterly) shell
This will put you inside of the shell. Now you can get courses by running these commands:
python manage.py ingest jhu --term Fall --years 2021
python manage.py digest jhu
* Open a browser and visit https://jhu.sem.ly and hack away
To install google chrome for running test inside docker:
First get a shell (same as above docker exec -it...)
Then first run (one time only)
/code/build/install_chrome.sh
To run tests, run:
python manage.py test