Skip to content

Setup django-oscar development environment with docker-compose

Notifications You must be signed in to change notification settings

trydirect/django-oscar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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