Name | Size | Modified | Last Commit | Author |
---|---|---|---|---|
nginx | ||||
volumes | ||||
.env | Loading ... | |||
.gitignore | Loading ... | |||
README.md | Loading ... | |||
docker-compose.yml | Loading ... |
Realtime web app
This application plots data in realtime from instruments, using zmq protocol
Installation
We recommend using docker/docker-compose for test/production but you can install the aplication as a normal django app.
1. Download
Download the application realtime_web to your workspace
$ cd /path/to/your/workspace $ git clone http://intranet.igp.gob.pe:8082/realtime_web && cd realtime_web
2. Config app
Update enviroment vars (/path/to/app/.env)
HTTP_PORT ZMQ_PORT
Create a copy of settings.py.template to settings.py (/path/to/app/realtime/settings.py.template)
Update settings vars
SECRET_KEY (You can generate at https://miniwebtool.com/django-secret-key-generator/) ALLOWED_HOSTS STATIC_URL (by default '/realtime/static') LOGIN_REDIRECT_URL (by default '/realtime/admin') LOGOUT_REDIRECT_URL (by default '/realtime') BASE_URL (by default 'realtime')
Update in nginx conf static location (/path/to/app/nginx/app.conf)
location ( by default '/realtime/static/')
3. Build application, make migrations and create superuser (only once at installation)
$ cd /path/to/app
$ docker-compose build
$ docker-compose run web python manage.py makemigrations
$ docker-compose run web python manage.py migrate
$ docker-compose run web python manage.py loaddata plotter/fixtures/plotter_data.json
$ docker-compose run web python manage.py collectstatic
$ docker-compose run web python manage.py createsuperuser
4. Run containers
$ docker-compose up -d
Maintenance (upgrade app)
Use the following commands when upgrading app from repo
$