Merge from main

This commit is contained in:
Ubuntu 2023-12-06 12:39:53 +00:00 committed by dx-tan
parent 8664a10635
commit ea79c4c396

View File

@ -1,5 +1,5 @@
version: '3.0'
# TODO: use docker-compose extend: for compact purpose
version: '3.0'
networks:
ctel-sbt:
driver: bridge
@ -42,14 +42,14 @@ services:
ports:
- 9880:9000
image: sidp/cope2n-be-fi-sbt
container_name: "sidp-cope2n-be-ctel-manulife-sbt"
# container_name: "sidp-cope2n-be-ctel-manulife-sbt"
environment:
- MEDIA_ROOT=${MEDIA_ROOT}
- DB_ENGINE=${DB_ENGINE}
- DB_SCHEMA=${DB_SCHEMA}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=db-manulife-sbt
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PUBLIC_PORT}
- DEBUG=${DEBUG}
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
@ -65,7 +65,7 @@ services:
- INTERNAL_SDS_KEY=${INTERNAL_SDS_KEY}
- FI_USER_NAME=${FI_USER_NAME}
- FI_PASSWORD=${FI_PASSWORD}
- S3_ENDPOINT=http://minio:9884
# - S3_ENDPOINT=http://minio:9884
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
@ -74,9 +74,8 @@ services:
- ctel-sbt
volumes:
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
- ./cope2n-api:/app
- BE_static:/app/static
# - sqlite_data:/app/
# - ./cope2n-api:/app
working_dir: /app
# depends_on:
# db:
@ -90,19 +89,19 @@ services:
gunicorn fwd.asgi:application -k uvicorn.workers.UvicornWorker -b 0.0.0.0:9000" # pre-makemigrations on prod
# command: sh -c "tail -f > /dev/null"
minio:
image: minio/minio
ports:
- 9884:9884
- 9885:9885
environment:
- MINIO_ACCESS_KEY=${S3_ACCESS_KEY}
- MINIO_SECRET_KEY=${S3_SECRET_KEY}
volumes:
- ./minio_data:/data
networks:
- ctel-sbt
command: server --address :9884 --console-address :9885 /data
# minio:
# image: minio/minio
#ports:
# - 9884:9884
# - 9885:9885
#environment:
# - MINIO_ACCESS_KEY=${S3_ACCESS_KEY}
# - MINIO_SECRET_KEY=${S3_SECRET_KEY}
#volumes:
# - ./minio_data:/data
#networks:
# - ctel-sbt
#command: server --address :9884 --console-address :9885 /data
be-celery-manulife-sbt:
# build:
@ -112,7 +111,7 @@ services:
# - "UID=${UID:-1000}"
# - "GID=${GID:-1000}"
image: sidp/cope2n-be-fi-sbt
container_name: "sidp-cope2n-be-celery-manulife-sbt"
# container_name: "sidp-cope2n-be-celery-manulife-sbt"
environment:
- MEDIA_ROOT=${MEDIA_ROOT}
- PYTHONPATH=${PYTHONPATH}:/app # For import module
@ -121,14 +120,20 @@ services:
- DB_SCHEMA=${DB_SCHEMA}
- DB_USER=${DB_USER}
- DB_PASSWORD=${DB_PASSWORD}
- DB_HOST=db-manulife-sbt
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PUBLIC_PORT}
- BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-manulife-sbt:5672
- BASE_UI_URL=http://fe:${VITE_PORT}
- DEBUG=${DEBUG}
- S3_ENDPOINT=http://minio:9884
- IMAGE_TOKEN_LIFE_TIME=${IMAGE_TOKEN_LIFE_TIME}
- CTEL_KEY=${CTEL_KEY}
- SECRET_KEY=${SECRET_KEY}
- ALLOWED_HOSTS=${ALLOWED_HOSTS}
# - S3_ENDPOINT=http://minio:9884
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
- S3_SECRET_KEY=${S3_SECRET_KEY}
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
- BASE_URL=http://be-ctel-manulife-sbt:${BASE_PORT}
networks:
- ctel-sbt
@ -141,7 +146,7 @@ services:
volumes:
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
# - sqlite_data:/app/
- ./cope2n-api:/app
# - ./cope2n-api:/app
working_dir: /app
command: sh -c "celery -A fwd_api.celery_worker.worker worker -l INFO"
@ -164,7 +169,7 @@ services:
rabbitmq-manulife-sbt:
mem_reservation: 600m
mem_limit: 4g
container_name: sidp-cope2n-be-rabbitmq-manulife-sbt
# container_name: sidp-cope2n-be-rabbitmq-manulife-sbt
restart: always
image: rabbitmq:3.10-alpine
# ports:
@ -194,31 +199,15 @@ services:
condition: service_started
be-celery-manulife-sbt:
condition: service_started
environment:
# - VITE_PROXY=http://be-ctel-manulife-sbt:${BASE_PORT}
- VITE_PROXY=http://42.96.42.13:9880
- VITE_API_BASE_URL=http://fe-sbt:80
volumes:
- BE_static:/backend-static
# Front-end services
fe:
build:
context: cope2n-fe
shm_size: 10gb
dockerfile: Dockerfile
shm_size: 10gb
image: sidp/cope2n-fe-fi-sbt
container_name: "sidp-cope2n-fe-ctel-manulife-sbt"
privileged: true
ports:
- 9882:80
environment:
- VITE_PROXY=http://be-ctel-manulife-sbt:${BASE_PORT}
# - VITE_PROXY=http://42.96.42.13:9880
- VITE_API_BASE_URL=http://fe:80
- VITE_API_BASE_URL=http://fe-sbt:80
volumes:
- BE_static:/backend-static l-sbt
networks:
- ctel-sbt
volumes:
db_data:
rabbitmq_data: