Added the docker files and ansible playbooks for two instances namely pkl and chd.

This commit is contained in:
2020-12-14 17:58:00 +05:30
parent 294f53147f
commit 4f5ba47d46
12 changed files with 341 additions and 9 deletions

17
docker/files/chd.env Normal file
View File

@ -0,0 +1,17 @@
HOST=0.0.0.0
PORT=80
LOG_LEVEL=WARN
DEBUG=false
SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/pettychd
MODULE_NAME=barker.main
PROJECT_NAME=barker
REDIS_HOST=redis
REDIS_PORT=6379
SECRET_KEY=d9e4facec94d7e0bf3d63ca03b1d78d834b158627b6593274f7fe27f6aed6db4
MIDDLEWARE_SECRET_KEY=8d5f28b083
ALGORITHM=HS256
JWT_TOKEN_EXPIRE_MINUTES=30
NEW_DAY_OFFSET_MINUTES=420
TIMEZONE_OFFSET_MINUTES=330
ALEMBIC_LOG_LEVEL=INFO
ALEMBIC_SQLALCHEMY_LOG_LEVEL=WARN

View File

@ -0,0 +1,39 @@
server {
listen 80;
server_name {{ http_host }};
# Allow large attachments
client_max_body_size 128M;
location /api {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location /token {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location /refresh {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location /db-image {
proxy_set_header Host $host:$server_port;
proxy_set_header X-Scheme $scheme;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://localhost:{{ host_port }};
}
location / {
root /var/lib/{{ host_directory }}/frontend;
index index.html index.htm;
try_files $uri $uri/ /index.html =404;
}
}

17
docker/files/pkl.env Normal file
View File

@ -0,0 +1,17 @@
HOST=0.0.0.0
PORT=80
LOG_LEVEL=WARN
DEBUG=false
SQLALCHEMY_DATABASE_URI=postgresql://postgres:123456@db:5432/pettypkl
MODULE_NAME=barker.main
PROJECT_NAME=barker
REDIS_HOST=redis
REDIS_PORT=6379
SECRET_KEY=bd6e5dee0f3b8a6f0db50f7aa08e91d55b2ae5ab6df126defa37e80602481002
MIDDLEWARE_SECRET_KEY=1d34ef6597
ALGORITHM=HS256
JWT_TOKEN_EXPIRE_MINUTES=30
NEW_DAY_OFFSET_MINUTES=420
TIMEZONE_OFFSET_MINUTES=330
ALEMBIC_LOG_LEVEL=INFO
ALEMBIC_SQLALCHEMY_LOG_LEVEL=WARN