Update: db->sql, Add: S3
This commit is contained in:
parent
a84e3dce05
commit
0ffa4e777f
@ -1,7 +1,7 @@
|
|||||||
version: '3.0'
|
version: '3.0'
|
||||||
# TODO: use docker-compose extend: for compact purpose
|
# TODO: use docker-compose extend: for compact purpose
|
||||||
networks:
|
networks:
|
||||||
ctel:
|
ctel-sbt:
|
||||||
driver: bridge
|
driver: bridge
|
||||||
|
|
||||||
services:
|
services:
|
||||||
@ -12,13 +12,13 @@ services:
|
|||||||
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-manulife-sbt"
|
||||||
networks:
|
networks:
|
||||||
- ctel
|
- 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-manulife-sbt:5672
|
||||||
- CUDA_VISIBLE_DEVICES=1
|
- 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
|
||||||
working_dir: /workspace/cope2n-ai-fi
|
working_dir: /workspace/cope2n-ai-fi
|
||||||
@ -31,6 +31,9 @@ services:
|
|||||||
# capabilities: [gpu]
|
# capabilities: [gpu]
|
||||||
# command: bash -c "tail -f > /dev/null"
|
# command: bash -c "tail -f > /dev/null"
|
||||||
command: bash run.sh
|
command: bash run.sh
|
||||||
|
deploy:
|
||||||
|
mode: replicated
|
||||||
|
replicas: 2
|
||||||
# Back-end services
|
# Back-end services
|
||||||
be-ctel-manulife-sbt:
|
be-ctel-manulife-sbt:
|
||||||
build:
|
build:
|
||||||
@ -46,7 +49,7 @@ services:
|
|||||||
- DB_SCHEMA=${DB_SCHEMA}
|
- DB_SCHEMA=${DB_SCHEMA}
|
||||||
- DB_USER=${DB_USER}
|
- DB_USER=${DB_USER}
|
||||||
- DB_PASSWORD=${DB_PASSWORD}
|
- DB_PASSWORD=${DB_PASSWORD}
|
||||||
- DB_HOST=${DB_HOST}
|
- DB_HOST=db-manulife-sbt
|
||||||
- DB_PORT=${DB_PUBLIC_PORT}
|
- DB_PORT=${DB_PUBLIC_PORT}
|
||||||
- DEBUG=${DEBUG}
|
- DEBUG=${DEBUG}
|
||||||
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
|
- CORS_ALLOWED_ORIGINS=${CORS_ALLOWED_ORIGINS}
|
||||||
@ -68,7 +71,7 @@ services:
|
|||||||
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
|
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
|
||||||
# restart: always
|
# restart: always
|
||||||
networks:
|
networks:
|
||||||
- ctel
|
- ctel-sbt
|
||||||
volumes:
|
volumes:
|
||||||
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
|
- ${HOST_MEDIA_FOLDER}:${MEDIA_ROOT}
|
||||||
- ./cope2n-api:/app
|
- ./cope2n-api:/app
|
||||||
@ -97,7 +100,7 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- ./minio_data:/data
|
- ./minio_data:/data
|
||||||
networks:
|
networks:
|
||||||
- ctel
|
- ctel-sbt
|
||||||
command: server --address :9884 --console-address :9885 /data
|
command: server --address :9884 --console-address :9885 /data
|
||||||
|
|
||||||
be-celery-manulife-sbt:
|
be-celery-manulife-sbt:
|
||||||
@ -113,13 +116,13 @@ services:
|
|||||||
- MEDIA_ROOT=${MEDIA_ROOT}
|
- MEDIA_ROOT=${MEDIA_ROOT}
|
||||||
- PYTHONPATH=${PYTHONPATH}:/app # For import module
|
- PYTHONPATH=${PYTHONPATH}:/app # For import module
|
||||||
- PYTHONUNBUFFERED=1 # For show print log
|
- PYTHONUNBUFFERED=1 # For show print log
|
||||||
|
- DB_ENGINE=${DB_ENGINE}
|
||||||
- DB_SCHEMA=${DB_SCHEMA}
|
- DB_SCHEMA=${DB_SCHEMA}
|
||||||
- DB_USER=${DB_USER}
|
- DB_USER=${DB_USER}
|
||||||
- DB_PASSWORD=${DB_PASSWORD}
|
- DB_PASSWORD=${DB_PASSWORD}
|
||||||
- DB_HOST=${DB_HOST}
|
- DB_HOST=db-manulife-sbt
|
||||||
- DB_PORT=${DB_INTERNAL_PORT}
|
- DB_PORT=${DB_PUBLIC_PORT}
|
||||||
- BROKER_URL=${BROKER_URL}
|
- BROKER_URL=amqp://${RABBITMQ_DEFAULT_USER}:${RABBITMQ_DEFAULT_PASS}@rabbitmq-manulife-sbt:5672
|
||||||
- DB_ENGINE=${DB_ENGINE}
|
|
||||||
- DEBUG=${DEBUG}
|
- DEBUG=${DEBUG}
|
||||||
- S3_ENDPOINT=http://minio:9884
|
- S3_ENDPOINT=http://minio:9884
|
||||||
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
|
- S3_ACCESS_KEY=${S3_ACCESS_KEY}
|
||||||
@ -127,7 +130,7 @@ services:
|
|||||||
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
|
- S3_BUCKET_NAME=${S3_BUCKET_NAME}
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
- ctel
|
- ctel-sbt
|
||||||
# restart: always
|
# restart: always
|
||||||
depends_on:
|
depends_on:
|
||||||
db-manulife-sbt:
|
db-manulife-sbt:
|
||||||
@ -145,16 +148,13 @@ services:
|
|||||||
db-manulife-sbt:
|
db-manulife-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-manulife-sbt-db
|
||||||
image: postgres:14.7-alpine
|
image: postgres:14.7-alpine
|
||||||
volumes:
|
volumes:
|
||||||
- db_data:/var/lib/postgresql/data
|
- ./postgres_data:/var/lib/postgresql/data
|
||||||
- ./cope2n-ai-fi:/workspace/cope2n-ai-fi # for dev container only
|
|
||||||
- ./cope2n-api:/workspace/cope2n-api
|
|
||||||
- ./cope2n-fe:/workspace/cope2n-fe
|
|
||||||
working_dir: /workspace/cope2n-api
|
working_dir: /workspace/cope2n-api
|
||||||
networks:
|
networks:
|
||||||
- ctel
|
- ctel-sbt
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_USER=${DB_USER}
|
- POSTGRES_USER=${DB_USER}
|
||||||
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
- POSTGRES_PASSWORD=${DB_PASSWORD}
|
||||||
@ -166,13 +166,13 @@ services:
|
|||||||
container_name: sidp-cope2n-be-rabbitmq-manulife-sbt
|
container_name: sidp-cope2n-be-rabbitmq-manulife-sbt
|
||||||
restart: always
|
restart: always
|
||||||
image: rabbitmq:3.10-alpine
|
image: rabbitmq:3.10-alpine
|
||||||
ports:
|
# ports:
|
||||||
- 5672:5672
|
# - 5672:5672
|
||||||
volumes:
|
volumes:
|
||||||
- rabbitmq_data:/var/lib/rabbitmq
|
- rabbitmq_data:/var/lib/rabbitmq
|
||||||
working_dir: /workspace/cope2n-api
|
working_dir: /workspace/cope2n-api
|
||||||
networks:
|
networks:
|
||||||
- ctel
|
- ctel-sbt
|
||||||
environment:
|
environment:
|
||||||
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
|
- RABBITMQ_DEFAULT_USER=${RABBITMQ_DEFAULT_USER}
|
||||||
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
|
- RABBITMQ_DEFAULT_PASS=${RABBITMQ_DEFAULT_PASS}
|
||||||
@ -193,7 +193,7 @@ services:
|
|||||||
- VITE_API_BASE_URL=http://fe:80
|
- VITE_API_BASE_URL=http://fe:80
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
- ctel
|
- ctel-sbt
|
||||||
volumes:
|
volumes:
|
||||||
db_data:
|
db_data:
|
||||||
rabbitmq_data:
|
rabbitmq_data:
|
||||||
|
Loading…
Reference in New Issue
Block a user