Skip to content
Snippets Groups Projects
Commit e3e5d169 authored by Ingo Leindecker's avatar Ingo Leindecker
Browse files

Added dockerfile and updated readme

parent 37dca7d5
No related branches found
No related tags found
No related merge requests found
FROM python:3
COPY . /tmp/
RUN chmod +x /tmp/entrypoint.sh
RUN pip install --no-cache-dir -r /tmp/requirements.txt
RUN python /tmp/manage.py migrate
ENTRYPOINT ["/tmp/entrypoint.sh"]
# Superuser parameters are --username USERNAME and --email EMAIL but there is no password
# RUN python /tmp/manage.py createsuperuser
......@@ -5,6 +5,14 @@ AURA Steering: Program Scheduler
Installation
------------
If you have a working Docker environment, do::
$ docker build -t pv_container .
$ docker run -p 8000:8000 -d pv_container:latest
and log into it at http://127.0.0.1:8000/admin/ with username "admin" and password "admin". Full setup without Docker is done as described below.
To get setup you must have the following installed:
* MySQL-Client Development libraries
......@@ -34,9 +42,10 @@ Setting up the database
By default the project is set up to run on a SQLite database.
Create a file pv/local_settings.py and add at least the line::
Create a file pv/local_settings.py and add at least the two lines::
SECRET_KEY = 'secret key'
USE_TZ = False
(obviously replacing "secret key" with a key of your choice).
......@@ -71,13 +80,6 @@ Create a file pv/mysql.cnf and give your MySQL credentials::
password =
default-character-set = utf8
Adding an admin user
--------------------
In order to create an admin user (which you will need to login to the webinterface after the next step) run::
(python)$ python manage.py createsuperuser
Running a web server
--------------------
......@@ -87,4 +89,6 @@ In development you should run::
(python)$ python manage.py runserver
After this you can open http://127.0.0.1:8000/admin in your browser and log in with the admin credential you created previously.
\ No newline at end of file
After this you can open http://127.0.0.1:8000/admin in your browser and log in with username "admin" and password "admin".
Make sure to change your password by visiting http://127.0.0.1:8000/admin/auth/user/1/password/
\ No newline at end of file
#!/bin/bash
set -e
python /tmp/manage.py loaddata /tmp/program/fixtures/*.yaml
python /tmp/manage.py runserver 0.0.0.0:8000
exec "$@"
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