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