项目作者: trydirect

项目描述 :
Setup django-oscar development environment with docker-compose
高级语言: Python
项目地址: git://github.com/trydirect/django-oscar.git
创建时间: 2019-05-30T07:51:18Z
项目社区:https://github.com/trydirect/django-oscar

开源协议:

下载


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:

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

Run stack with:

  1. $ docker-compose up -d

Setup sandbox

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

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

Share project volume

Sync project source code on host machine and container

  1. Generate static files
    1. docker exec --user=oscar -it oscar bash -c 'cd sandbox && python3 manage.py collectstatic’
  2. Copy source code from container to host machine:
    1. docker cp oscar:/app .
  3. Remove containers
    1. docker-compose down
  4. Add line from below to docker-compose.yml for oscar service:

    1. volumes:
    2. - ./app:/app
  5. Add line from below to docker-compose.yml for nginx service:

    1. volumes:
    2. - ./app/sandbox/public:/usr/share/nginx/html
  6. Recreate containers
    1. docker-compose up -d

Setup Sentry

  1. 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