trydirect / django-oscar

Setup django-oscar development environment with docker-compose

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Build Status Docker Stars Docker Pulls Docker Automated Docker Build Gitter chat

Django-Oscar template for developers

The goal of this project is to give possibility to setup Django-Oscar development environment as easy as it possible. More development tools for debugging and monitoring will follow.

Installation

Clone this project into your work directory:

$ git clone "https://github.com/trydirect/django-oscar.git"
$ cd django-oscar

Run stack with:

$ docker-compose up -d

Setup sandbox

In order to create django oscar database structure and load demo data execute following command:

docker exec --user=oscar -it oscar /sandbox.sh

Share project volume

Sync project source code on host machine and container

  1. Generate static files
docker exec --user=oscar -it oscar  bash -c 'cd sandbox && python3 manage.py collectstatic’
  1. Copy source code from container to host machine:
docker cp oscar:/app .
  1. Remove containers
docker-compose down 
  1. Add line from below to docker-compose.yml for oscar service:
volumes:
     - ./app:/app
  1. Add line from below to docker-compose.yml for nginx service:
volumes:
     - ./app/sandbox/public:/usr/share/nginx/html
  1. Recreate containers
docker-compose up -d 

Setup Sentry

COMPOSE_HTTP_TIMEOUT=300 docker-compose exec sentry bash -c "sentry upgrade"

Quick deployment to cloud

Amazon AWS, Digital Ocean, Hetzner and others

Contributing

  1. Fork it (https://github.com/trydirect/django-oscar/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Support Development

Donate

About

Setup django-oscar development environment with docker-compose


Languages

Language:Python 92.5%Language:Dockerfile 4.1%Language:Shell 3.4%