Code Monkey home page Code Monkey logo

arquitran's Introduction

Alquitrán Web Payments © REST API

Built with Python 3.5 and Django 🐍

Build Status

screenshot

API documentation | Running instance

Development

Clone this repository:

git clone https://github.com/IIC2173-2016-2/arquitran.git
cd arquitran

Prepare virtualenv:

pip install -U virtualenv
virtualenv --python=python3.5 arquitranenv
source ./arquitranenv/bin/activate

# To stop using this virtualenv:
deactivate

Install dependencies:

pip install -r requirements.txt

Setup Postgres database:

Open the Postgres interactive command line:

psql

Create 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

Run server

Start the app at http://localhost:8000/ with:

python manage.py runserver

Production

Make sure you have Docker and Docker-compose installed.

Create Docker volume:

docker volume create --name=alquitran-data

Setup environment variables:

# Keep this secret
export POSTGRES_PASSWORD=SECRET_AND_LONG_HASH
export SECRET_KEY=SECRET_AND_LONG_HASH

Run Docker-compose:

docker-compose up -d

Run migrations:

docker-compose exec django python manage.py migrate

Create super user:

docker-compose exec django python manage.py createsuperuser --username=admin [email protected]

Update app with short downtime:

docker-compose up -d --build

Testing

Run the test suite with:

python manage.py test

arquitran's People

Contributors

lopezjurip avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.