Built with Python 3.5 and Django 🐍
API documentation | Running instance
Clone this repository:
git clone https://github.com/IIC2173-2016-2/arquitran.git
cd arquitranpip install -U virtualenv
virtualenv --python=python3.5 arquitranenv
source ./arquitranenv/bin/activate
# To stop using this virtualenv:
deactivateInstall dependencies:
pip install -r requirements.txtOpen the Postgres interactive command line:
psqlCreate the user, database and grant him permissions:
CREATE DATABASE arquitran;
CREATE USER arquitranuser WITH PASSWORD 'password';
ALTER USER arquitranuser CREATEDB;
GRANT ALL PRIVILEGES ON DATABASE arquitran TO arquitranuser;Make migrations:
python manage.py migrate
Start the app at http://localhost:8000/ with:
python manage.py runserverMake sure you have Docker and Docker-compose installed.
Create Docker volume:
docker volume create --name=alquitran-dataSetup environment variables:
# Keep this secret
export POSTGRES_PASSWORD=SECRET_AND_LONG_HASH
export SECRET_KEY=SECRET_AND_LONG_HASHRun Docker-compose:
docker-compose up -dRun migrations:
docker-compose exec django python manage.py migrateCreate super user:
docker-compose exec django python manage.py createsuperuser --username=admin [email protected]Update app with short downtime:
docker-compose up -d --buildRun the test suite with:
python manage.py test