Fix: FE issues
This commit is contained in:
parent
ea79c4c396
commit
d5e83af467
@ -466,7 +466,8 @@ class CtelViewSet(viewsets.ViewSet):
|
|||||||
empty_data = serializer.data[0]
|
empty_data = serializer.data[0]
|
||||||
empty_data["data"] = None
|
empty_data["data"] = None
|
||||||
return Response(status=status.HTTP_200_OK, data=empty_data)
|
return Response(status=status.HTTP_200_OK, data=empty_data)
|
||||||
|
data = serializer.data[0]
|
||||||
|
data["status"] = "3"
|
||||||
return Response(status=status.HTTP_200_OK, data=serializer.data[0])
|
return Response(status=status.HTTP_200_OK, data=serializer.data[0])
|
||||||
|
|
||||||
@throw_on_failure(InvalidException(excArgs='data'))
|
@throw_on_failure(InvalidException(excArgs='data'))
|
||||||
|
@ -7,7 +7,7 @@ import {
|
|||||||
import { API } from './api';
|
import { API } from './api';
|
||||||
|
|
||||||
export async function getKieJob<TResult = BaseResult>(requestId: string) {
|
export async function getKieJob<TResult = BaseResult>(requestId: string) {
|
||||||
const response = await API.get<JobResponse<TResult>>(`/ctel/result/${requestId}`);
|
const response = await API.get<JobResponse<TResult>>(`/ctel/result/${requestId}/`);
|
||||||
// const response = await API.get<JobResponse<TResult>>(`/ctel/result/SAP3ad4bb28771044eaa6e1a2d06dcc8f5e`);
|
// const response = await API.get<JobResponse<TResult>>(`/ctel/result/SAP3ad4bb28771044eaa6e1a2d06dcc8f5e`);
|
||||||
return response.data;
|
return response.data;
|
||||||
}
|
}
|
||||||
|
@ -5,19 +5,19 @@ networks:
|
|||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
services:
|
services:
|
||||||
cope2n-fi-manulife-sbt:
|
cope2n-fi-sbt:
|
||||||
build:
|
build:
|
||||||
context: cope2n-ai-fi
|
context: cope2n-ai-fi
|
||||||
shm_size: 10gb
|
shm_size: 10gb
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
shm_size: 10gb
|
shm_size: 10gb
|
||||||
image: sidp/cope2n-ai-fi-sbt
|
image: sidp/cope2n-ai-fi-sbt
|
||||||
# container_name: "sidp-cope2n-ai-fi-manulife-sbt"
|
# container_name: "sidp-cope2n-ai-fi-sbt"
|
||||||
networks:
|
networks:
|
||||||
- ctel-sbt
|
- ctel-sbt
|
||||||
privileged: true
|
privileged: true
|
||||||
environment:
|
environment:
|
||||||
- CELERY_BROKER=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-manulife-sbt:5672
|
- CELERY_BROKER=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-sbt:5672
|
||||||
- CUDA_VISIBLE_DEVICES=0
|
- CUDA_VISIBLE_DEVICES=0
|
||||||
volumes:
|
volumes:
|
||||||
- ./cope2n-ai-fi:/workspace/cope2n-ai-fi # for dev container only
|
- ./cope2n-ai-fi:/workspace/cope2n-ai-fi # for dev container only
|
||||||
@ -35,14 +35,14 @@ services:
|
|||||||
mode: replicated
|
mode: replicated
|
||||||
replicas: 2
|
replicas: 2
|
||||||
# Back-end services
|
# Back-end services
|
||||||
be-ctel-manulife-sbt:
|
be-ctel-sbt:
|
||||||
build:
|
build:
|
||||||
context: cope2n-api
|
context: cope2n-api
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
ports:
|
ports:
|
||||||
- 9880:9000
|
- 9880:9000
|
||||||
image: sidp/cope2n-be-fi-sbt
|
image: sidp/cope2n-be-fi-sbt
|
||||||
# container_name: "sidp-cope2n-be-ctel-manulife-sbt"
|
# container_name: "sidp-cope2n-be-ctel-sbt"
|
||||||
environment:
|
environment:
|
||||||
- MEDIA_ROOT=${MEDIA_ROOT}
|
- MEDIA_ROOT=${MEDIA_ROOT}
|
||||||
- DB_ENGINE=${DB_ENGINE}
|
- DB_ENGINE=${DB_ENGINE}
|
||||||
@ -57,8 +57,8 @@ services:
|
|||||||
- CTEL_KEY=${CTEL_KEY}
|
- CTEL_KEY=${CTEL_KEY}
|
||||||
- SECRET_KEY=${SECRET_KEY}
|
- SECRET_KEY=${SECRET_KEY}
|
||||||
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
|
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
|
||||||
- BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-manulife-sbt:5672
|
- BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-sbt:5672
|
||||||
- BASE_URL=http://be-ctel-manulife-sbt:${BASE_PORT}
|
- BASE_URL=http://be-ctel-sbt:${BASE_PORT}
|
||||||
- BASE_UI_URL=http://fe:${VITE_PORT}
|
- BASE_UI_URL=http://fe:${VITE_PORT}
|
||||||
- AUTH_TOKEN_LIFE_TIME=${AUTH_TOKEN_LIFE_TIME}
|
- AUTH_TOKEN_LIFE_TIME=${AUTH_TOKEN_LIFE_TIME}
|
||||||
- IMAGE_TOKEN_LIFE_TIME=${IMAGE_TOKEN_LIFE_TIME}
|
- IMAGE_TOKEN_LIFE_TIME=${IMAGE_TOKEN_LIFE_TIME}
|
||||||
@ -83,7 +83,6 @@ services:
|
|||||||
# rabbitmq:
|
# rabbitmq:
|
||||||
# condition: service_started
|
# condition: service_started
|
||||||
command: sh -c "python manage.py collectstatic --no-input &&
|
command: sh -c "python manage.py collectstatic --no-input &&
|
||||||
python manage.py makemigrations &&
|
|
||||||
python manage.py migrate &&
|
python manage.py migrate &&
|
||||||
python manage.py compilemessages &&
|
python manage.py compilemessages &&
|
||||||
gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker -b 0.0.0.0:9000" # pre-makemigrations on prod
|
gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker -b 0.0.0.0:9000" # pre-makemigrations on prod
|
||||||
@ -103,7 +102,7 @@ services:
|
|||||||
# - ctel-sbt
|
# - ctel-sbt
|
||||||
#command: server --address :9884 --console-address :9885 /data
|
#command: server --address :9884 --console-address :9885 /data
|
||||||
|
|
||||||
be-celery-manulife-sbt:
|
be-celery-sbt:
|
||||||
# build:
|
# build:
|
||||||
# context: cope2n-api
|
# context: cope2n-api
|
||||||
# dockerfile: Dockerfile
|
# dockerfile: Dockerfile
|
||||||
@ -111,7 +110,7 @@ services:
|
|||||||
# - "UID=${UID:-1000}"
|
# - "UID=${UID:-1000}"
|
||||||
# - "GID=${GID:-1000}"
|
# - "GID=${GID:-1000}"
|
||||||
image: sidp/cope2n-be-fi-sbt
|
image: sidp/cope2n-be-fi-sbt
|
||||||
# container_name: "sidp-cope2n-be-celery-manulife-sbt"
|
# container_name: "sidp-cope2n-be-celery-sbt"
|
||||||
environment:
|
environment:
|
||||||
- MEDIA_ROOT=${MEDIA_ROOT}
|
- MEDIA_ROOT=${MEDIA_ROOT}
|
||||||
- PYTHONPATH=${PYTHONPATH}:/app # For import module
|
- PYTHONPATH=${PYTHONPATH}:/app # For import module
|
||||||
@ -122,7 +121,7 @@ services:
|
|||||||
- DB_PASSWORD=${DB_PASSWORD}
|
- DB_PASSWORD=${DB_PASSWORD}
|
||||||
- DB_HOST=${DB_HOST}
|
- DB_HOST=${DB_HOST}
|
||||||
- DB_PORT=${DB_PUBLIC_PORT}
|
- DB_PORT=${DB_PUBLIC_PORT}
|
||||||
- BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-manulife-sbt:5672
|
- BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-sbt:5672
|
||||||
- BASE_UI_URL=http://fe:${VITE_PORT}
|
- BASE_UI_URL=http://fe:${VITE_PORT}
|
||||||
- DEBUG=${DEBUG}
|
- DEBUG=${DEBUG}
|
||||||
- IMAGE_TOKEN_LIFE_TIME=${IMAGE_TOKEN_LIFE_TIME}
|
- IMAGE_TOKEN_LIFE_TIME=${IMAGE_TOKEN_LIFE_TIME}
|
||||||
@ -133,15 +132,15 @@ services:
|
|||||||
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
|
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
|
||||||
- S3_SECRET_KEY=${S3_SECRET_KEY}
|
- S3_SECRET_KEY=${S3_SECRET_KEY}
|
||||||
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
|
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
|
||||||
- BASE_URL=http://be-ctel-manulife-sbt:${BASE_PORT}
|
- BASE_URL=http://be-ctel-sbt:${BASE_PORT}
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
- ctel-sbt
|
- ctel-sbt
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
db-manulife-sbt:
|
db-sbt:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
rabbitmq-manulife-sbt:
|
rabbitmq-sbt:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
volumes:
|
volumes:
|
||||||
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
|
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
|
||||||
@ -151,10 +150,10 @@ services:
|
|||||||
working_dir: /app
|
working_dir: /app
|
||||||
command: sh -c "celery -A fwd_api.celery_worker.worker worker -l INFO"
|
command: sh -c "celery -A fwd_api.celery_worker.worker worker -l INFO"
|
||||||
# Back-end persistent
|
# Back-end persistent
|
||||||
db-manulife-sbt:
|
db-sbt:
|
||||||
mem_reservation: 500m
|
mem_reservation: 500m
|
||||||
mem_limit: 1g
|
mem_limit: 1g
|
||||||
# container_name: sidp-cope2n-be-manulife-sbt-db
|
# container_name: sidp-cope2n-be-sbt-db
|
||||||
image: postgres:14.7-alpine
|
image: postgres:14.7-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- ./postgres_data:/var/lib/postgresql/data
|
- ./postgres_data:/var/lib/postgresql/data
|
||||||
@ -166,10 +165,10 @@ services:
|
|||||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
- POSTGRES_DB=${DB_SCHEMA}
|
- POSTGRES_DB=${DB_SCHEMA}
|
||||||
|
|
||||||
rabbitmq-manulife-sbt:
|
rabbitmq-sbt:
|
||||||
mem_reservation: 600m
|
mem_reservation: 600m
|
||||||
mem_limit: 4g
|
mem_limit: 4g
|
||||||
# container_name: sidp-cope2n-be-rabbitmq-manulife-sbt
|
# container_name: sidp-cope2n-be-rabbitmq-sbt
|
||||||
restart: always
|
restart: always
|
||||||
image: rabbitmq:3.10-alpine
|
image: rabbitmq:3.10-alpine
|
||||||
# ports:
|
# ports:
|
||||||
@ -195,12 +194,12 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- 9881:80
|
- 9881:80
|
||||||
depends_on:
|
depends_on:
|
||||||
be-ctel-manulife-sbt:
|
be-ctel-sbt:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
be-celery-manulife-sbt:
|
be-celery-sbt:
|
||||||
condition: service_started
|
condition: service_started
|
||||||
environment:
|
environment:
|
||||||
- VITE_PROXY=http://be-ctel-manulife-sbt:${BASE_PORT}
|
- VITE_PROXY=http://be-ctel-sbt:${BASE_PORT}
|
||||||
# - VITE_PROXY=http://42.96.42.13:9880
|
# - VITE_PROXY=http://42.96.42.13:9880
|
||||||
- VITE_API_BASE_URL=http://fe-sbt:80
|
- VITE_API_BASE_URL=http://fe-sbt:80
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
Reference in New Issue
Block a user