Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| e22c197d3a | |||
| becab58c73 | |||
| 70a863f6e1 | |||
| 2b55d206e2 |
@@ -3,10 +3,10 @@ import asyncio
|
|||||||
import json
|
import json
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
from app.db import init_db, Entity, Order, Contract, User, AccessToken
|
from app.db import init_db, Entity, Contract, ContractTemplate, ProvisionTemplate, User
|
||||||
|
|
||||||
|
|
||||||
models = [Entity, Order, Contract, User]
|
models = [Entity, Contract, User, ContractTemplate, ProvisionTemplate]
|
||||||
|
|
||||||
|
|
||||||
async def handle_migration(args):
|
async def handle_migration(args):
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ services:
|
|||||||
back:
|
back:
|
||||||
build:
|
build:
|
||||||
context: ${ROOT_PATH}/back
|
context: ${ROOT_PATH}/back
|
||||||
|
image: git.dorfsvald.net/ewandor/cht-lawfirm-back-prod
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
|
||||||
- "8000:8000"
|
|
||||||
volumes:
|
volumes:
|
||||||
- ${ROOT_PATH}/back/app:/code/app
|
- ${ROOT_PATH}/back/app:/code/app
|
||||||
- ${ROOT_PATH}/back/media:/code/media
|
- ${ROOT_PATH}/back/media:/code/media
|
||||||
@@ -14,12 +13,13 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ${ROOT_PATH}/front
|
context: ${ROOT_PATH}/front
|
||||||
dockerfile: prod.Dockerfile
|
dockerfile: prod.Dockerfile
|
||||||
|
image: git.dorfsvald.net/ewandor/cht-lawfirm-nginx-prod
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "3820:80"
|
- "3820:80"
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: "mongo:4.4.18"
|
image: "mongo:4.4.19"
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
|
|||||||
42
docker-compose.prod.yml.back
Normal file
42
docker-compose.prod.yml.back
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
version: "3.9"
|
||||||
|
services:
|
||||||
|
back:
|
||||||
|
build:
|
||||||
|
context: ${ROOT_PATH}/back
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "8000:8000"
|
||||||
|
volumes:
|
||||||
|
- ${ROOT_PATH}/back/app:/code/app
|
||||||
|
- ${ROOT_PATH}/back/media:/code/media
|
||||||
|
|
||||||
|
front:
|
||||||
|
build:
|
||||||
|
context: ${ROOT_PATH}/front
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "4200:4200"
|
||||||
|
volumes:
|
||||||
|
- ${ROOT_PATH}/front/app/src:/app/src
|
||||||
|
- ${ROOT_PATH}/front/app/public:/app/public
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
build:
|
||||||
|
context: ${ROOT_PATH}/nginx
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "3820:80"
|
||||||
|
|
||||||
|
mongo:
|
||||||
|
image: "mongo:4.4.18"
|
||||||
|
restart: always
|
||||||
|
ports:
|
||||||
|
- "27017:27017"
|
||||||
|
environment:
|
||||||
|
MONGO_INITDB_ROOT_USERNAME: root
|
||||||
|
MONGO_INITDB_ROOT_PASSWORD: IBO3eber0mdw2R9pnInLdtFykQFY2f06
|
||||||
|
volumes:
|
||||||
|
- database:/data/db
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
database:
|
||||||
@@ -3,6 +3,7 @@ services:
|
|||||||
back:
|
back:
|
||||||
build:
|
build:
|
||||||
context: ./back
|
context: ./back
|
||||||
|
image: cht-lawfirm-back-dev
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
@@ -13,6 +14,7 @@ services:
|
|||||||
front:
|
front:
|
||||||
build:
|
build:
|
||||||
context: ./front
|
context: ./front
|
||||||
|
image: cht-lawfirm-front-dev
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "4200:4200"
|
- "4200:4200"
|
||||||
@@ -23,12 +25,13 @@ services:
|
|||||||
nginx:
|
nginx:
|
||||||
build:
|
build:
|
||||||
context: ./nginx
|
context: ./nginx
|
||||||
|
image: cht-lawfirm-nginx-dev
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "80:80"
|
- "80:80"
|
||||||
|
|
||||||
mongo:
|
mongo:
|
||||||
image: "mongo"
|
image: "mongo:4.4.19"
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "27017:27017"
|
- "27017:27017"
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ http {
|
|||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
try_files $uri $uri/ /usr/share/nginx/html/index.html =404;
|
try_files $uri $uri/ /index.html?$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~* ^.+\.css$ {
|
location ~* ^.+\.css$ {
|
||||||
|
|||||||
Reference in New Issue
Block a user