gliglip / v2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This project will be superceded by something using Rust

Toystori v2

Codacy Badge Build Status

Development setup

Database setup

# use the docker image for postgres with postgis
$ docker volume create pgdata
$ docker run \
    -v pgdata:/var/lib/postgresql/data \
    -e POSTGRES_PASSWORD=1234 \
    -e POSTGRES_DB=toystori_dev \
    -p 5432:5432 \
    -d mdillon/postgis:9.6-alpine

Running application with docker

$ docker build -t toystori-v2 .

# docker for mac
$ export HOSTIP=192.168.65.1

# linux
$ export HOSTIP=127.0.0.1

$ docker run  --add-host=docker:${HOSTIP} -p 9090:9090 --rm -it toystori-v2

Note - See the application here

Running application locally

The recommended python version is 3.6.1

$ python3 -m venv ~/.venv/toystori
$ . ~/.venv/toystori/bin/activate
$ pip install -r requirements/dev.txt

# Install GeoDjango dependencies
$ brew install gdal libgeoip

$ python app/manage.py migrate
$ python app/manage.py runserver

Tests

Tests are run with py.test.

# run with output
$ py.test -s

# run with coverage (used by ci)
py.test --cov-report xml --cov .

About

License:MIT License


Languages

Language:Python 53.2%Language:HTML 40.7%Language:CSS 3.2%Language:Dockerfile 2.0%Language:Makefile 0.9%