forked from freeleaps/freeleaps-pub
Merge branch 'master' into timqiu/devbox
This commit is contained in:
commit
e3b7f602bc
@ -1030,7 +1030,7 @@ if [[ $USE_LOCAL_COMPONENT_VAL == true ]]; then
|
||||
|
||||
# Start Gitea, MongoDB, RabbitMQ and other components containers
|
||||
echo "===> start Gitea, MongoDB, RabbitMQ and other components containers"
|
||||
docker-compose -f docker-compose.dev.arm64.new.yaml up -d mongodb rabbitmq gitea "${start_components[@]}"
|
||||
docker-compose -f docker-compose.dev.arm64.new.yaml up -d mongodb rabbitmq gitea redis "${start_components[@]}"
|
||||
|
||||
gitea_container_id=$(docker ps --no-trunc -a --filter "name=^freeleaps2-gitea$" --format "{{.ID}}")
|
||||
echo "$gitea_container_id" > "$WORKING_HOME/.gitea-instance"
|
||||
@ -1040,6 +1040,10 @@ if [[ $USE_LOCAL_COMPONENT_VAL == true ]]; then
|
||||
|
||||
rabbitmq_container_id=$(docker ps --no-trunc -a --filter "name=^freeleaps2-rabbitmq$" --format "{{.ID}}")
|
||||
echo "$rabbitmq_container_id" > "$WORKING_HOME/.rabbitmq-instance"
|
||||
|
||||
redis_container_id=$(docker ps --no-trunc -a --filter "name=^freeleaps2-redis$" --format "{{.ID}}")
|
||||
echo "$redis_container_id" > "$WORKING_HOME/.redis-instance"
|
||||
|
||||
|
||||
# Get all components container ids and save to .component-instance file
|
||||
for component in "${start_components[@]}"; do
|
||||
@ -1061,7 +1065,7 @@ else
|
||||
echo ' ===> Using online components for Freeleaps services.'
|
||||
echo '============================================'
|
||||
# Start Gitea, MongoDB, RabbitMQ containers
|
||||
docker-compose -f docker-compose.dev.arm64.new.yaml up -d mongodb rabbitmq
|
||||
docker-compose -f docker-compose.dev.arm64.new.yaml up -d mongodb rabbitmq redis
|
||||
echo "===> start components is $start_components"
|
||||
|
||||
# Save MongoDB and RabbitMQ container ids to .mongodb-instance and .rabbitmq-instance
|
||||
@ -1070,6 +1074,9 @@ else
|
||||
|
||||
rabbitmq_container_id=$(docker ps -a --format '{{.Names}}' | grep "^freeleaps2-rabbitmq\$")
|
||||
echo "$rabbitmq_container_id" > "$WORKING_HOME/.rabbitmq-instance"
|
||||
|
||||
redis_container_id=$(docker ps -a --format '{{.Names}}' | grep "^freeleaps2-redis\$")
|
||||
echo "$redis_container_id" > "$WORKING_HOME/.redis-instance"
|
||||
fi
|
||||
|
||||
# Check all components are started
|
||||
|
||||
@ -10,12 +10,12 @@ services:
|
||||
environment:
|
||||
- DISABLE_REGISTRATION=true
|
||||
- REQUIRE_SIGNIN_VIEW=true
|
||||
volumes:
|
||||
volumes:
|
||||
- ${WORKING_HOME}/freeleaps2-gitea:/data:Z
|
||||
networks:
|
||||
- devbox_freeleaps2-network
|
||||
healthcheck:
|
||||
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
||||
test: [ "CMD", "curl", "-f", "http://localhost:3000/" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@ -34,9 +34,9 @@ services:
|
||||
- ${WORKING_HOME}/freeleaps2-mongodb-data:/data/db
|
||||
networks:
|
||||
- devbox_freeleaps2-network
|
||||
command: ["mongod", "--bind_ip_all"]
|
||||
command: [ "mongod", "--bind_ip_all" ]
|
||||
healthcheck:
|
||||
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
|
||||
test: [ "CMD", "mongosh", "--eval", "db.adminCommand('ping')" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
@ -56,11 +56,29 @@ services:
|
||||
networks:
|
||||
- devbox_freeleaps2-network
|
||||
healthcheck:
|
||||
test: ["CMD", "rabbitmq-diagnostics", "status"]
|
||||
test: [ "CMD", "rabbitmq-diagnostics", "status" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
redis:
|
||||
platform: linux/${ARCH:-arm64}
|
||||
container_name: freeleaps2-redis
|
||||
image: rabbitmq:latest
|
||||
restart: always
|
||||
ports:
|
||||
- 6379:6379
|
||||
networks:
|
||||
- devbox_freeleaps2-network
|
||||
healthcheck:
|
||||
test: [ "CMD", "redis-cli", "ping" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
volumes:
|
||||
- ${WORKING_HOME}/freeleaps2-redis-data:/var/lib/redis
|
||||
|
||||
devsvc:
|
||||
container_name: devsvc
|
||||
image: freeleaps/devsvc:${DEVSVC_IMAGE_TAG:-latest-linux-arm64}
|
||||
@ -277,6 +295,8 @@ services:
|
||||
condition: service_healthy
|
||||
rabbitmq:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
ports:
|
||||
- 8012:8012
|
||||
environment:
|
||||
@ -296,11 +316,12 @@ services:
|
||||
- APPLICATION_ACTIVITY_LOG=freeleaps-chat.application.log
|
||||
- FREELEAPS_ENV=dev
|
||||
- FREELEAPS_CHAT_ENDPOINT=http://freeleaps-alpha.com/api/chat/
|
||||
- FREELEAPS_DEVSVC_ENDPOINT=http://devsvc:8007/api/devsvc/
|
||||
- FREELEAPS_DEVSVC_ENDPOINT=http://devsvc:8007/api/devsvc/
|
||||
- FREELEAPS_CONTENT_ENDPOINT=http://content:8013/api/content/
|
||||
- FREELEAPS_NOTIFICATION_ENDPOINT=http://notification:8003/api/notification/
|
||||
- FREELEAPS_CENTRAL_STORAGE_ENDPOINT=http://central_storage:8005/api/central_storage/
|
||||
- FREELEAPS_AUTHENTICATION_ENDPOINT=http://authentication:8004/api/auth/
|
||||
- REDIS_URL=redis://freeleaps2-redis:6379/0
|
||||
- TZ=Asia/Shanghai
|
||||
command:
|
||||
# Use a conditional check for RabbitMQ in alpha profile
|
||||
|
||||
Loading…
Reference in New Issue
Block a user