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
|
# Start Gitea, MongoDB, RabbitMQ and other components containers
|
||||||
echo "===> 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}}")
|
gitea_container_id=$(docker ps --no-trunc -a --filter "name=^freeleaps2-gitea$" --format "{{.ID}}")
|
||||||
echo "$gitea_container_id" > "$WORKING_HOME/.gitea-instance"
|
echo "$gitea_container_id" > "$WORKING_HOME/.gitea-instance"
|
||||||
@ -1041,6 +1041,10 @@ if [[ $USE_LOCAL_COMPONENT_VAL == true ]]; then
|
|||||||
rabbitmq_container_id=$(docker ps --no-trunc -a --filter "name=^freeleaps2-rabbitmq$" --format "{{.ID}}")
|
rabbitmq_container_id=$(docker ps --no-trunc -a --filter "name=^freeleaps2-rabbitmq$" --format "{{.ID}}")
|
||||||
echo "$rabbitmq_container_id" > "$WORKING_HOME/.rabbitmq-instance"
|
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
|
# Get all components container ids and save to .component-instance file
|
||||||
for component in "${start_components[@]}"; do
|
for component in "${start_components[@]}"; do
|
||||||
tmp_container_id=$(docker ps --no-trunc -a --filter "name=^$component$" --format "{{.ID}}")
|
tmp_container_id=$(docker ps --no-trunc -a --filter "name=^$component$" --format "{{.ID}}")
|
||||||
@ -1061,7 +1065,7 @@ else
|
|||||||
echo ' ===> Using online components for Freeleaps services.'
|
echo ' ===> Using online components for Freeleaps services.'
|
||||||
echo '============================================'
|
echo '============================================'
|
||||||
# Start Gitea, MongoDB, RabbitMQ containers
|
# 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"
|
echo "===> start components is $start_components"
|
||||||
|
|
||||||
# Save MongoDB and RabbitMQ container ids to .mongodb-instance and .rabbitmq-instance
|
# 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\$")
|
rabbitmq_container_id=$(docker ps -a --format '{{.Names}}' | grep "^freeleaps2-rabbitmq\$")
|
||||||
echo "$rabbitmq_container_id" > "$WORKING_HOME/.rabbitmq-instance"
|
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
|
fi
|
||||||
|
|
||||||
# Check all components are started
|
# Check all components are started
|
||||||
|
|||||||
@ -15,7 +15,7 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- devbox_freeleaps2-network
|
- devbox_freeleaps2-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "curl", "-f", "http://localhost:3000/"]
|
test: [ "CMD", "curl", "-f", "http://localhost:3000/" ]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -34,9 +34,9 @@ services:
|
|||||||
- ${WORKING_HOME}/freeleaps2-mongodb-data:/data/db
|
- ${WORKING_HOME}/freeleaps2-mongodb-data:/data/db
|
||||||
networks:
|
networks:
|
||||||
- devbox_freeleaps2-network
|
- devbox_freeleaps2-network
|
||||||
command: ["mongod", "--bind_ip_all"]
|
command: [ "mongod", "--bind_ip_all" ]
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
|
test: [ "CMD", "mongosh", "--eval", "db.adminCommand('ping')" ]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@ -56,11 +56,29 @@ services:
|
|||||||
networks:
|
networks:
|
||||||
- devbox_freeleaps2-network
|
- devbox_freeleaps2-network
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "rabbitmq-diagnostics", "status"]
|
test: [ "CMD", "rabbitmq-diagnostics", "status" ]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
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:
|
devsvc:
|
||||||
container_name: devsvc
|
container_name: devsvc
|
||||||
image: freeleaps/devsvc:${DEVSVC_IMAGE_TAG:-latest-linux-arm64}
|
image: freeleaps/devsvc:${DEVSVC_IMAGE_TAG:-latest-linux-arm64}
|
||||||
@ -277,6 +295,8 @@ services:
|
|||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
rabbitmq:
|
rabbitmq:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
redis:
|
||||||
|
condition: service_healthy
|
||||||
ports:
|
ports:
|
||||||
- 8012:8012
|
- 8012:8012
|
||||||
environment:
|
environment:
|
||||||
@ -301,6 +321,7 @@ services:
|
|||||||
- FREELEAPS_NOTIFICATION_ENDPOINT=http://notification:8003/api/notification/
|
- FREELEAPS_NOTIFICATION_ENDPOINT=http://notification:8003/api/notification/
|
||||||
- FREELEAPS_CENTRAL_STORAGE_ENDPOINT=http://central_storage:8005/api/central_storage/
|
- FREELEAPS_CENTRAL_STORAGE_ENDPOINT=http://central_storage:8005/api/central_storage/
|
||||||
- FREELEAPS_AUTHENTICATION_ENDPOINT=http://authentication:8004/api/auth/
|
- FREELEAPS_AUTHENTICATION_ENDPOINT=http://authentication:8004/api/auth/
|
||||||
|
- REDIS_URL=redis://freeleaps2-redis:6379/0
|
||||||
- TZ=Asia/Shanghai
|
- TZ=Asia/Shanghai
|
||||||
command:
|
command:
|
||||||
# Use a conditional check for RabbitMQ in alpha profile
|
# Use a conditional check for RabbitMQ in alpha profile
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user