parent
1d4af24bb0
commit
120fb436bf
14 changed files with 175 additions and 10 deletions
@ -1,4 +1,5 @@ |
|||||||
# -*- coding: utf-8 -*- |
# -*- coding: utf-8 -*- |
||||||
PROJECT_NAME = 'dokumentor' |
PROJECT_NAME = 'Dokumentor' |
||||||
|
PROJECT_NAME_LOCAL = 'dokumentor' |
||||||
REPO = 'git@bitbucket.org:Air51/dokumentor_dev.git' |
REPO = 'git@bitbucket.org:Air51/dokumentor_dev.git' |
||||||
BRANCH = 'develop' |
BRANCH = 'develop' |
||||||
|
|||||||
@ -0,0 +1,5 @@ |
|||||||
|
# -*- coding: utf-8 -*- |
||||||
|
USER = 'root' |
||||||
|
PASS = 'fS0h7hC87dCY' |
||||||
|
HOSTS = ['185.204.0.134:22'] |
||||||
|
|
||||||
@ -0,0 +1,29 @@ |
|||||||
|
upstream dokumentor-develop { |
||||||
|
server localhost:32768; |
||||||
|
} |
||||||
|
|
||||||
|
map $http_upgrade $connection_upgrade { |
||||||
|
default upgrade; |
||||||
|
'' close; |
||||||
|
} |
||||||
|
|
||||||
|
server { |
||||||
|
client_max_body_size 175M; |
||||||
|
listen 0.0.0.0:80; |
||||||
|
server_name www.develop.dokumentor.ru develop.dokumentor.ru; |
||||||
|
|
||||||
|
location / { |
||||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||||
|
proxy_set_header Host $http_host; |
||||||
|
proxy_set_header X-NginX-Proxy true; |
||||||
|
|
||||||
|
proxy_set_header Upgrade $http_upgrade; |
||||||
|
proxy_set_header Connection $connection_upgrade; |
||||||
|
proxy_http_version 1.1; |
||||||
|
|
||||||
|
proxy_pass http://dokumentor-develop/; |
||||||
|
proxy_redirect off; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,33 @@ |
|||||||
|
upstream dokumentor-master { |
||||||
|
server localhost:32770; |
||||||
|
} |
||||||
|
|
||||||
|
map $http_upgrade $connection_upgrade { |
||||||
|
default upgrade; |
||||||
|
'' close; |
||||||
|
} |
||||||
|
|
||||||
|
server { |
||||||
|
client_max_body_size 175M; |
||||||
|
listen 0.0.0.0:80; |
||||||
|
server_name www.dokumentor.ru dokumentor.ru; |
||||||
|
|
||||||
|
ssl_certificate /opt/app/Dokumentor/conf/ssl-keys/dokumentor.ru.crt; |
||||||
|
ssl_certificate_key /opt/app/Dokumentor/conf/ssl-keys/dokumentor.ru.key; |
||||||
|
add_header Strict-Transport-Security 'max-age=604800'; |
||||||
|
|
||||||
|
location / { |
||||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||||
|
proxy_set_header Host $http_host; |
||||||
|
proxy_set_header X-NginX-Proxy true; |
||||||
|
|
||||||
|
proxy_set_header Upgrade $http_upgrade; |
||||||
|
proxy_set_header Connection $connection_upgrade; |
||||||
|
proxy_http_version 1.1; |
||||||
|
|
||||||
|
proxy_pass http://dokumentor-master/; |
||||||
|
proxy_redirect off; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,29 @@ |
|||||||
|
upstream dokumentor-master { |
||||||
|
server localhost:32769; |
||||||
|
} |
||||||
|
|
||||||
|
map $http_upgrade $connection_upgrade { |
||||||
|
default upgrade; |
||||||
|
'' close; |
||||||
|
} |
||||||
|
|
||||||
|
server { |
||||||
|
client_max_body_size 175M; |
||||||
|
listen 0.0.0.0:80; |
||||||
|
server_name www.stage.dokumentor.ru stage.dokumentor.ru; |
||||||
|
|
||||||
|
location / { |
||||||
|
proxy_set_header X-Real-IP $remote_addr; |
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
||||||
|
proxy_set_header Host $http_host; |
||||||
|
proxy_set_header X-NginX-Proxy true; |
||||||
|
|
||||||
|
proxy_set_header Upgrade $http_upgrade; |
||||||
|
proxy_set_header Connection $connection_upgrade; |
||||||
|
proxy_http_version 1.1; |
||||||
|
|
||||||
|
proxy_pass http://dokumentor-master/; |
||||||
|
proxy_redirect off; |
||||||
|
} |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,66 @@ |
|||||||
|
version: '2' |
||||||
|
|
||||||
|
services: |
||||||
|
web: |
||||||
|
restart: always |
||||||
|
container_name: dokumentor-web |
||||||
|
build: . |
||||||
|
volumes: |
||||||
|
- /etc/localtime:/etc/localtime:ro |
||||||
|
- /etc/timezone:/etc/timezone:ro |
||||||
|
- ./:/opt/app |
||||||
|
ports: |
||||||
|
- "32768:80" |
||||||
|
- "33768:5555" |
||||||
|
env_file: conf/env |
||||||
|
depends_on: |
||||||
|
- db |
||||||
|
- redis |
||||||
|
- rabbitmq |
||||||
|
|
||||||
|
db: |
||||||
|
restart: always |
||||||
|
container_name: dokumentor-db |
||||||
|
image: kiasaki/alpine-postgres:9.5 |
||||||
|
expose: |
||||||
|
- "5432" |
||||||
|
volumes: |
||||||
|
- /etc/localtime:/etc/localtime:ro |
||||||
|
- /etc/timezone:/etc/timezone:ro |
||||||
|
- ./data/postgresql:/var/lib/postgresql/data |
||||||
|
environment: |
||||||
|
- POSTGRES_USER=dokumentor |
||||||
|
- POSTGRES_PASSWORD=dokumentor |
||||||
|
|
||||||
|
redis: |
||||||
|
restart: always |
||||||
|
container_name: dokumentor-redis |
||||||
|
image: redis:alpine |
||||||
|
volumes: |
||||||
|
- /etc/localtime:/etc/localtime:ro |
||||||
|
- /etc/timezone:/etc/timezone:ro |
||||||
|
expose: |
||||||
|
- "6379" |
||||||
|
|
||||||
|
rabbitmq: |
||||||
|
restart: always |
||||||
|
container_name: dokumentor-rabbitmq |
||||||
|
image: rabbitmq:alpine |
||||||
|
environment: |
||||||
|
- RABBITMQ_DEFAULT_USER=dokumentor |
||||||
|
- RABBITMQ_DEFAULT_PASS=dokumentor |
||||||
|
volumes: |
||||||
|
- /etc/localtime:/etc/localtime:ro |
||||||
|
- /etc/timezone:/etc/timezone:ro |
||||||
|
expose: |
||||||
|
- "5672" |
||||||
|
- "5671" |
||||||
|
|
||||||
|
bower: |
||||||
|
container_name: dokumentor-bower |
||||||
|
build: |
||||||
|
context: . |
||||||
|
dockerfile: ./conf/compose/Dockerfile |
||||||
|
command: /bin/sh -c "cd /opt/app && bower i" |
||||||
|
volumes: |
||||||
|
- ./:/opt/app |
||||||
Loading…
Reference in new issue