parent
ed2a36599d
commit
7e840cc3bd
17 changed files with 180 additions and 11 deletions
@ -0,0 +1,8 @@ |
||||
env |
||||
compose |
||||
public |
||||
node_modules |
||||
bower_components |
||||
tmp_emails |
||||
tmp |
||||
var |
||||
@ -0,0 +1,58 @@ |
||||
# EditorConfig is awesome: http://EditorConfig.org |
||||
|
||||
# Howto with your editor: http://editorconfig.org/#download |
||||
# Sublime: https://github.com/sindresorhus/editorconfig-sublime |
||||
|
||||
# top-most EditorConfig file |
||||
root = true |
||||
|
||||
# Unix-style newlines with a newline ending every file |
||||
[**] |
||||
end_of_line = lf |
||||
insert_final_newline = true |
||||
|
||||
# Standard at: https://github.com/felixge/node-style-guide |
||||
[**.{js,json}] |
||||
trim_trailing_whitespace = true |
||||
indent_style = space |
||||
indent_size = 2 |
||||
quote_type = single |
||||
curly_bracket_next_line = false |
||||
spaces_around_operators = true |
||||
space_after_control_statements = true |
||||
space_after_anonymous_functions = true |
||||
spaces_in_brackets = false |
||||
|
||||
# No Standard. Please document a standard if different from .js |
||||
[**.{yml,css}] |
||||
trim_trailing_whitespace = true |
||||
indent_style = tab |
||||
|
||||
[**.html] |
||||
trim_trailing_whitespace = true |
||||
indent_style = space |
||||
indent_size = 2 |
||||
|
||||
# No standard. Please document a standard if different from .js |
||||
[**.md] |
||||
indent_style = tab |
||||
|
||||
[**.py] |
||||
indent_style = space |
||||
indent_size = 4 |
||||
trim_trailing_whitespace = true |
||||
|
||||
# Standard at: |
||||
[Makefile] |
||||
indent_style = tab |
||||
|
||||
[**.yml] |
||||
trim_trailing_whitespace = true |
||||
indent_style = space |
||||
indent_size = 2 |
||||
|
||||
# The indentation in package.json will always need to be 2 spaces |
||||
# https://github.com/npm/npm/issues/4718 |
||||
[{package, bower}.json] |
||||
indent_style = space |
||||
indent_size = 2 |
||||
@ -0,0 +1,10 @@ |
||||
#!/usr/bin/env bash |
||||
|
||||
python src/manage.py loaddata src/myauth/fixtures/myauth.json |
||||
python src/manage.py loaddata src/commons/fixtures/cms.json |
||||
python src/manage.py loaddata src/commons/fixtures/djangocms_text_ckeditor.json |
||||
python src/manage.py loaddata src/commons/fixtures/sites.json |
||||
python src/manage.py loaddata src/customer/fixtures/price.json |
||||
python src/manage.py loaddata src/docs/fixtures/country.json |
||||
python src/manage.py loaddata src/docs/fixtures/currency.json |
||||
python src/manage.py loaddata src/docs/fixtures/measure.json |
||||
@ -0,0 +1,7 @@ |
||||
FROM python:3.6 |
||||
ENV PYTHONUNBUFFERED 1 |
||||
RUN mkdir -p /code/public/ |
||||
WORKDIR /code/src |
||||
COPY requirements /code/requirements |
||||
RUN pip install --upgrade pip && pip install -r ../requirements/local.txt |
||||
ADD . /code/ |
||||
@ -0,0 +1,7 @@ |
||||
FROM python:3.6 |
||||
ENV PYTHONUNBUFFERED 1 |
||||
RUN mkdir -p /code/public/ |
||||
WORKDIR /code/src |
||||
COPY requirements /code/requirements |
||||
RUN pip install --upgrade pip && pip install -r ../requirements/production.txt |
||||
ADD . /code/ |
||||
@ -0,0 +1,8 @@ |
||||
FROM python:3.6 |
||||
ENV PYTHONUNBUFFERED 1 |
||||
RUN mkdir -p /code/public/ |
||||
WORKDIR /code |
||||
COPY requirements /code/requirements |
||||
RUN apt-get update && apt-get -y install ghostscript && apt-get clean |
||||
RUN pip install --upgrade pip && pip install -r requirements/local.txt |
||||
ADD . /code/ |
||||
@ -0,0 +1,8 @@ |
||||
FROM python:3.6 |
||||
ENV PYTHONUNBUFFERED 1 |
||||
RUN mkdir -p /code/public/ |
||||
WORKDIR /code |
||||
COPY requirements /code/requirements |
||||
RUN apt-get update && apt-get -y install ghostscript && apt-get clean |
||||
RUN pip install --upgrade pip && pip install -r requirements/production.txt |
||||
ADD . /code/ |
||||
@ -0,0 +1,61 @@ |
||||
version: '2' |
||||
services: |
||||
|
||||
db: |
||||
restart: always |
||||
image: postgres |
||||
container_name: db |
||||
environment: |
||||
POSTGRES_USER: 'dokumentor' |
||||
POSTGRES_PASSWORD: 'dokumentor' |
||||
volumes: |
||||
- ./data:/var/lib/postgresql/data |
||||
|
||||
rabbitmq: |
||||
restart: always |
||||
container_name: rabbitmq |
||||
image: rabbitmq:latest |
||||
environment: |
||||
- RABBITMQ_DEFAULT_USER=dokumentor |
||||
- RABBITMQ_DEFAULT_PASS=dokumentor |
||||
ports: |
||||
- "8080:15672" |
||||
- "5672:5672" |
||||
- "5671:5671" |
||||
|
||||
celery: |
||||
build: |
||||
context: . |
||||
dockerfile: compose/Dockerfile.celery.local |
||||
container_name: celery |
||||
command: bash -c 'celery -A dokumentor worker -l info -E' |
||||
volumes: |
||||
- .:/code |
||||
env_file: conf/env |
||||
environment: |
||||
DJANGO_DB: 'postgres://dokumentor:dokumentor@db:5432/dokumentor' |
||||
CELERY_BROKER_URL: 'amqp://dokumentor:dokumentor@rabbitmq:5672//' |
||||
CELERY_RESULT_BACKEND: 'amqp://dokumentor:dokumentor@rabbitmq:5672//' |
||||
links: |
||||
- db |
||||
- rabbitmq |
||||
|
||||
web: |
||||
restart: always |
||||
container_name: web |
||||
build: |
||||
context: . |
||||
dockerfile: compose/Dockerfile.web.local |
||||
command: bash -c 'python src/manage.py makemigrations && python src/manage.py migrate && python src/manage.py runserver 0.0.0.0:8000' |
||||
volumes: |
||||
- .:/code |
||||
ports: |
||||
- "8000:8000" |
||||
env_file: conf/env |
||||
environment: |
||||
DJANGO_DB: 'postgres://dokumentor:dokumentor@db:5432/dokumentor' |
||||
CELERY_BROKER_URL: 'amqp://dokumentor:dokumentor@rabbitmq:5672//' |
||||
CELERY_RESULT_BACKEND: 'amqp://dokumentor:dokumentor@rabbitmq:5672//' |
||||
depends_on: |
||||
- db |
||||
- rabbitmq |
||||
@ -1,3 +0,0 @@ |
||||
-r base.txt |
||||
psycopg2==2.6 |
||||
gunicorn==19.4.5 |
||||
@ -0,0 +1,2 @@ |
||||
-r base.txt |
||||
gunicorn==19.4.5 |
||||
@ -1,3 +1,2 @@ |
||||
-r base.txt |
||||
psycopg2==2.6 |
||||
gunicorn==19.4.5 |
||||
Loading…
Reference in new issue