-
-
Notifications
You must be signed in to change notification settings - Fork 1
Initial Setup with Docker
Dallas Fraser edited this page Aug 13, 2018
·
2 revisions
The MLSB app can be ran locally using Docker. One just needs to install Docker and run the setup.sh script. For those on Windows it is recommended to use git bash.
./setup.sh
This will create a Docker container with a postgres database, redis mem cache and flask web app. The following environment variables are defaulted but can be overridden simply by setting them in your environment:
- ADMIN=admin (the admin's user name)
- PASSWORD=password (the admin password)
- DATABASE_URL=postgresql://$ADMIN:$PASSWORD@postgres:5432/mlsb (the postgres database to connect to)
- KIK=kik (the Kik user name used to access certain APIs)
- KIKPW=password (the password for the Kik user)
- SECRET_KEY=secret (a secret key used by Flask)
- REDIS_URL=redis://redis:6379/1 (the redis database to use for caching)
Finally, the app can be shutdown by simply running the teardown.sh script
./teardown.sh
Issue 1. Docker has an error when starting redis or postgres.
Solution 1.
Just Restart docker docker stop $(docker ps -a -q)
and hit restart on GUI.
Issue 2 Docker is unable to init DB
Solution 2
Run the ./teardown.sh
script and re-run ./setup.sh