diff --git a/devbox/devbox.local/devbox b/devbox/devbox.local/cli/devbox similarity index 97% rename from devbox/devbox.local/devbox rename to devbox/devbox.local/cli/devbox index f123934..fe1ce9d 100644 --- a/devbox/devbox.local/devbox +++ b/devbox/devbox.local/cli/devbox @@ -79,7 +79,7 @@ devbox_init_usage() { printf "Arguments\n" printf " --os -o [Optional] : Specifies the operating system. Default: auto.\n" printf " --arch -a [Optional] : Specifies the architecture. Default: auto.\n" - printf " --working-home -w [Optional] : Specifies the working home of DevBox CLI. Default: %s/.devbox\n" "$HOME" + printf " --working-home -w [Optional] : Specifies the working home of DevBox CLI. Default: %s/devbox\n" "$HOME" printf " --devbox-container-name -N [Optional] : Specifies the DevBox container name. Default: devbox.\n" printf " --devbox-container-port -P [Optional] : Specifies the container port for DevBox SSH access. Default: 22222.\n" printf " --devbox-image-repo -R [Optional] : Specifies the DevBox container image repository. Default: docker.io/freeleaps.\n" @@ -127,7 +127,7 @@ devbox_deinit_usage() { printf " devbox deinit : De-initialize the local development environment based on DevBox container.\n\n" printf "Arguments\n" - printf " --working-home -w [Optional] : Specifies the working home of DevBox CLI. Default: %s/.devbox\n" "$HOME" + printf " --working-home -w [Optional] : Specifies the working home of DevBox CLI. Default: %s/devbox\n" "$HOME" printf " --clear-logs -l [Optional] : Specifies whether to clear log files. Default: true\n" printf " --clear-repo -r [Optional] : Specifies whether to delete the source repository. Default: false\n\n" @@ -466,7 +466,7 @@ devbox_init_command() { local DEVBOX_REPO="$args_devbox_image_repo" # --devbox-image-repo local DEVBOX_IMAGE="$args_devbox_image_name" # --devbox-image-name local DEVBOX_TAG="$args_devbox_image_tag" # --devbox-image-tag - local WORKING_HOME="${args_working_home:-${WORKING_HOME:-${HOME}/.devbox}}" + local WORKING_HOME="${args_working_home:-${WORKING_HOME:-${HOME}/devbox}}" local FREELEAPS_USERNAME="$args_freeleaps_username" # --freeleaps-username local FREELEAPS_PASSWORD="$args_freeleaps_password" # --freeleaps-password @@ -508,7 +508,7 @@ devbox_init_command() { local DEVBOX_REPO="$(get_arg '--devbox-image-repo')" local DEVBOX_IMAGE="$(get_arg '--devbox-image-name')" local DEVBOX_TAG="$(get_arg '--devbox-image-tag')" - local WORKING_HOME="$(get_arg '--working-home' "${WORKING_HOME:-${HOME}/.devbox}")" + local WORKING_HOME="$(get_arg '--working-home' "${WORKING_HOME:-${HOME}/devbox}")" local FREELEAPS_USERNAME="$(get_arg '--freeleaps-username')" local FREELEAPS_PASSWORD="$(get_arg '--freeleaps-password')" local USE_LOCAL_COMPONENT="$(get_arg '--use-local-component')" @@ -765,7 +765,7 @@ devbox_init_command() { -p "${DEVBOX_PORT}:22" \ -p "${DEVBOX_FRONTEND_PORT}:5173" \ -p "${DEVBOX_BACKEND_PORT}:8002" \ - -v "$WORKING_HOME:/home/.devbox" \ + -v "$WORKING_HOME:/home/devbox" \ -v /var/run/docker.sock:/var/run/docker.sock \ --network "$DEVBOX_FREELEAPS2_NETWORK" \ "$devbox_full_image" 2>/dev/null @@ -984,15 +984,15 @@ export DEVBOX_BACKEND_PORT="${DEVBOX_BACKEND_PORT}" export DEVBOX_FRONTEND_PORT="${DEVBOX_FRONTEND_PORT}" -# Check if useing local component and update /home/.devbox/freeleaps/.dev.env -echo "step 2: Update /home/.devbox/freeleaps/apps/.env" +# Check if useing local component and update /home/devbox/freeleaps/.dev.env +echo "step 2: Update /home/devbox/freeleaps/apps/.env" # Get default IP address DEFAULT_IP=\$(ip route | grep default | sed -n 's/.*default via \([^ ]*\).*/\1/p') if [[ \$USE_LOCAL_COMPONENT_VAL == true ]]; then echo "==> Using local components" # Local components for Freeleaps services (devsvc, notification, content, central_storage, authentication) - cat << 'EOFinner' > /home/.devbox/freeleaps/apps/.env + cat << 'EOFinner' > /home/devbox/freeleaps/apps/.env # Online endpoint info export MONGODB_NAME=freeleaps2 export MONGODB_URI=mongodb://freeleaps2-mongodb:27017/ @@ -1019,7 +1019,7 @@ if [[ \$USE_LOCAL_COMPONENT_VAL == true ]]; then EOFinner else echo "==> Using online components" - cat << 'EOFinner' > /home/.devbox/freeleaps/apps/.env + cat << 'EOFinner' > /home/devbox/freeleaps/apps/.env # Online endpoint info export MONGODB_NAME=freeleaps2 export MONGODB_PORT=27017 @@ -1047,15 +1047,15 @@ fi # Effect the environment variables in the current shell -source /home/.devbox/freeleaps/apps/.env +source /home/devbox/freeleaps/apps/.env -# Ensure /home/.devbox/logs exists -mkdir -p /home/.devbox/logs +# Ensure /home/devbox/logs exists +mkdir -p /home/devbox/logs # Start WebAPI service echo "Starting WebAPI service..." -pushd /home/.devbox/freeleaps/apps -cp /home/.devbox/freeleaps/backend_env.sh /home/.devbox/freeleaps/apps/backend_env.sh +pushd /home/devbox/freeleaps/apps +cp /home/devbox/freeleaps/backend_env.sh /home/devbox/freeleaps/apps/backend_env.sh # 5. Istall python3.10 and venv module echo "5. Istall python3.10 and venv module" @@ -1089,7 +1089,7 @@ echo '============================================' echo ' Start to activate virtual environment' echo '============================================' source venv_t/bin/activate -source /home/.devbox/freeleaps/apps/.env +source /home/devbox/freeleaps/apps/.env # Verify the virtual environment is activated if [[ "\$VIRTUAL_ENV" != "" ]]; then @@ -1099,19 +1099,22 @@ else exit 1 fi + echo '============================================' echo ' Install requirements' echo '============================================' -pip install -r /home/.devbox/freeleaps/apps/requirements.txt +pip install -r /home/devbox/freeleaps/apps/requirements.txt + + echo '============================================' echo 'Start to run start_webapi.sh' echo '============================================' -./start_webapi.sh > /home/.devbox/logs/backend.logs 2>&1 & +./start_webapi.sh > /home/devbox/logs/backend.logs 2>&1 & BACKEND_PID=\$! # Save BACKEND_PID to a file \${WORKING_HOME}/.backend.pid: Stores the process id of backend process. -echo "\$BACKEND_PID" > /home/.devbox/.backend.pid +echo "\$BACKEND_PID" > /home/devbox/.backend.pid echo '============================================' echo 'Check if the WebAPI service started successfully' @@ -1147,7 +1150,7 @@ fi echo '============================================' echo ' Start frontend service locally' echo '============================================' -pushd /home/.devbox/freeleaps/frontend +pushd /home/devbox/freeleaps/frontend # start the frontend service export VITE_API_URL='http://127.0.0.1:8002' @@ -1182,11 +1185,11 @@ npm run build # 6️⃣ Format the code (Optional) npm run format # Start the frontend service with nohup in order to keep it running after the SSH session is closed. Save the process ID of the frontend service -nohup npm run dev > /home/.devbox/logs/frontend.logs 2>&1 & +nohup npm run dev > /home/devbox/logs/frontend.logs 2>&1 & FRONTEND_PID=\$! echo "npm run dev has been started with PID: \$FRONTEND_PID" -echo "\$FRONTEND_PID" > /home/.devbox/.frontend.pid +echo "\$FRONTEND_PID" > /home/devbox/.frontend.pid echo '============================================' @@ -1250,7 +1253,7 @@ devbox_deinit_command() { # src/deinit_command.sh echo "# It contains the implementation for the 'devbox deinit' command." - local WORKING_HOME="$(get_arg '--working-home' "${HOME}/.devbox")" + local WORKING_HOME="$(get_arg '--working-home' "${HOME}/devbox")" local CLEAR_LOGS="$(get_arg '--clear-logs')" local CLEAR_REPO="$(get_arg '--clear-repo')" @@ -1374,7 +1377,7 @@ devbox_deinit_command() { devbox_start_command() { local COMPONENT="$(get_arg '--component')" - local WORKING_HOME="$(get_arg '--working-home' "${HOME}/.devbox")" + local WORKING_HOME="$(get_arg '--working-home' "${HOME}/devbox")" local FREELEAPS_ENDPOINT="$(get_arg '--freeleaps-endpoint')" # Check if the DevBox container is running @@ -1478,7 +1481,7 @@ echo "Starting backend and frontend services..." echo '============================================' echo ' Start to run webapi.main:app ' echo '============================================' -pushd /home/.devbox/freeleaps/apps +pushd /home/devbox/freeleaps/apps # CHeck if the virtual environment is created if [ ! -f "venv_t/bin/activate" ]; then @@ -1490,7 +1493,7 @@ echo '============================================' echo ' Start to activate virtual environment' echo '============================================' source venv_t/bin/activate -source /home/.devbox/freeleaps/apps/.env +source /home/devbox/freeleaps/apps/.env # Verify the virtual environment is activated if [[ "\$VIRTUAL_ENV" != "" ]]; then @@ -1501,12 +1504,12 @@ else fi # Check if the backend service is already running -SERVICE_API_ACCESS_PORT=\$(cat /home/.devbox/.devbox-backend-port) -uvicorn freeleaps.webapi.main:app --reload --host 0.0.0.0 --port \$SERVICE_API_ACCESS_PORT > /home/.devbox/logs/backend.logs 2>&1 & +SERVICE_API_ACCESS_PORT=\$(cat /home/devbox/.devbox-backend-port) +uvicorn freeleaps.webapi.main:app --reload --host 0.0.0.0 --port \$SERVICE_API_ACCESS_PORT > /home/devbox/logs/backend.logs 2>&1 & BACKEND_PID=\$! # Save BACKEND_PID to a file \${WORKING_HOME}/.backend.pid: Stores the process id of backend process. -echo "\$BACKEND_PID" > /home/.devbox/.backend.pid +echo "\$BACKEND_PID" > /home/devbox/.backend.pid # Check if the backend service started successfully sleep 10 @@ -1542,12 +1545,12 @@ fi echo '============================================' echo ' Start frontend service locally' echo '============================================' -pushd /home/.devbox/freeleaps/frontend +pushd /home/devbox/freeleaps/frontend -npm run dev > /home/.devbox/logs/frontend.logs 2>&1 & +npm run dev > /home/devbox/logs/frontend.logs 2>&1 & FRONTEND_PID=\$! -echo "\$FRONTEND_PID" > /home/.devbox/.frontend.pid +echo "\$FRONTEND_PID" > /home/devbox/.frontend.pid # Check if the frontend service started successfully sleep 10 @@ -1559,7 +1562,7 @@ fi # Test the frontend service -WEB_APP_ACCESS_PORT=\$(cat /home/.devbox/.devbox-frontend-port) +WEB_APP_ACCESS_PORT=\$(cat /home/devbox/.devbox-frontend-port) echo "Testing frontend service... PORT: \$WEB_APP_ACCESS_PORT" attempt=0 @@ -1600,7 +1603,7 @@ fi devbox_stop_command() { echo "==> Stopping DevBox services..." local COMPONENT="$(get_arg '--component')" - local WORKING_HOME="$(get_arg '--working-home' "${HOME}/.devbox")" + local WORKING_HOME="$(get_arg '--working-home' "${HOME}/devbox")" # If the DevBox container is not running, exit if [[ -z "$COMPONENT" ]]; then @@ -1658,7 +1661,7 @@ devbox_status_command() { echo "==> Checking DevBox services status..." local COMPONENT="$(get_arg '--component')" - local WORKING_HOME="$(get_arg '--working-home' "${HOME}/.devbox")" + local WORKING_HOME="$(get_arg '--working-home' "${HOME}/devbox")" # Check if .devbox-instance file exists if [[ ! -f "${WORKING_HOME}/.devbox-instance" ]]; then @@ -1757,7 +1760,7 @@ devbox_status_command() { devbox_restart_command() { echo "==> Restarting DevBox services..." local COMPONENT="$(get_arg '--component')" - local WORKING_HOME="$(get_arg '--working-home' "${HOME}/.devbox")" + local WORKING_HOME="$(get_arg '--working-home' "${HOME}/devbox")" local FREELEAPS_ENDPOINT="$(get_arg '--freeleaps-endpoint')" # Check devbox container file path @@ -1868,7 +1871,7 @@ echo '============================================' echo ' Start to run webapi.main:app' echo '============================================' -pushd /home/.devbox/freeleaps/apps +pushd /home/devbox/freeleaps/apps # CHeck if the virtual environment is created @@ -1881,7 +1884,7 @@ echo '============================================' echo ' Start to activate virtual environment' echo '============================================' source venv_t/bin/activate -source /home/.devbox/freeleaps/apps/.env +source /home/devbox/freeleaps/apps/.env # Verify the virtual environment is activated if [[ "\$VIRTUAL_ENV" != "" ]]; then @@ -1892,12 +1895,12 @@ else fi # Check if the backend service is already running -SERVICE_API_ACCESS_PORT=\$(cat /home/.devbox/.devbox-backend-port) -uvicorn freeleaps.webapi.main:app --reload --host 0.0.0.0 --port \$SERVICE_API_ACCESS_PORT > /home/.devbox/logs/backend.logs 2>&1 & +SERVICE_API_ACCESS_PORT=\$(cat /home/devbox/.devbox-backend-port) +uvicorn freeleaps.webapi.main:app --reload --host 0.0.0.0 --port \$SERVICE_API_ACCESS_PORT > /home/devbox/logs/backend.logs 2>&1 & BACKEND_PID=\$! # Save BACKEND_PID to a file \${WORKING_HOME}/.backend.pid: Stores the process id of backend process. -echo "\$BACKEND_PID" > /home/.devbox/.backend.pid +echo "\$BACKEND_PID" > /home/devbox/.backend.pid # Check if the backend service started successfully sleep 10 @@ -1933,12 +1936,12 @@ fi echo '============================================' echo ' Start frontend service locally' echo '============================================' -pushd /home/.devbox/freeleaps/frontend +pushd /home/devbox/freeleaps/frontend -npm run dev > /home/.devbox/logs/frontend.logs 2>&1 & +npm run dev > /home/devbox/logs/frontend.logs 2>&1 & FRONTEND_PID=\$! -echo "\$FRONTEND_PID" > /home/.devbox/.frontend.pid +echo "\$FRONTEND_PID" > /home/devbox/.frontend.pid # Check if the frontend service started successfully sleep 10 @@ -1949,7 +1952,7 @@ fi # Test the frontend service -WEB_APP_ACCESS_PORT=\$(cat /home/.devbox/.devbox-frontend-port) +WEB_APP_ACCESS_PORT=\$(cat /home/devbox/.devbox-frontend-port) echo "Testing frontend service..." attempt=0 @@ -2484,7 +2487,7 @@ devbox_init_parse_requirements() { fi if [ -z "$(get_arg '--working-home')" ]; then - add_arg '--working-home' "${HOME}/.devbox" + add_arg '--working-home' "${HOME}/devbox" fi if [ -z "$(get_arg '--use-local-component')" ]; then @@ -2578,7 +2581,7 @@ devbox_deinit_parse_requirements() { # :command.default_assignments if [ -z "$(get_arg '--working-home')" ]; then - add_arg '--working-home' "${HOME}/.devbox" + add_arg '--working-home' "${HOME}/devbox" fi if [ -z "$(get_arg '--clear-logs')" ]; then add_arg '--clear-logs' "false" diff --git a/devbox/devbox.local/cli/docker-compose.dev.arm64.new.yaml b/devbox/devbox.local/cli/docker-compose.dev.arm64.new.yaml new file mode 100644 index 0000000..7c2861e --- /dev/null +++ b/devbox/devbox.local/cli/docker-compose.dev.arm64.new.yaml @@ -0,0 +1,266 @@ +services: + gitea: + # For apple chip, add: platform: linux/amd64 + container_name: freeleaps2-gitea + platform: linux/${ARCH:-arm64} + image: gitea/gitea:latest + restart: always + ports: + - "3000:3000" + environment: + - DISABLE_REGISTRATION=true + - REQUIRE_SIGNIN_VIEW=true + volumes: + - ${WORKING_HOME}/freeleaps2-gitea:/data:Z + networks: + - devbox_freeleaps2-network + + chat: + container_name: freeleaps-chat + build: + context: ${WORKING_HOME}/freeleaps/apps + dockerfile: ${WORKING_HOME}/freeleaps/dockers/dev.chat.Dockerfile + args: + CONTAINER_APP_ROOT: app + restart: always + ports: + - 8012:8012 + environment: + - CERT_PATH=/app/certs + - EMAIL_FROM=freeleaps@freeleaps.com + - MONGODB_NAME=freeleaps2 + - MONGODB_URI=mongodb://freeleaps2-mongodb:27017/ + - SITE_URL_ROOT=http://localhost + - JWT_SECRET_KEY=8f87ca8c3c9c3df09a9c78e0adb0927855568f6072d9efc892534aee35f5867b + - JWT_ALGORITHM=HS256 + - RABBITMQ_HOST=freeleaps2-rabbitmq + - RABBITMQ_PORT=5672 + - LOG_BASE_PATH=/app/log/freeleaps-chat + - BACKEND_LOG_FILE_NAME=freeleaps-chat.log + - 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_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/ + - CERT_PATH=/app/certs + - TZ=Asia/Shanghai + command: + # Use a conditional check for RabbitMQ in alpha profile + - /bin/sh + - -c + - | + uvicorn chat.main:app --reload --host=0.0.0.0 --port=8012 --workers 4 --timeout-keep-alive 120 --log-level info + volumes: + - type: bind + source: ${WORKING_HOME}/freeleaps/apps + target: /app/log/freeleaps-chat + networks: + - devbox_freeleaps2-network + + mongodb: + # For apple chip, add: platform: linux/amd64 + # For apple chip, you may want to downgrade to public mongo:4.4 for log support + container_name: freeleaps2-mongodb + platform: linux/${ARCH:-arm64} + image: mongo:latest + restart: always + ports: + - "27017:27017" + volumes: + - ${WORKING_HOME}/freeleaps2-mongodb-data:/data/db + networks: + - devbox_freeleaps2-network + + rabbitmq: + # For apple chip, add: platform: linux/amd64 + platform: linux/${ARCH:-arm64} + container_name: freeleaps2-rabbitmq + image: rabbitmq:latest + restart: always + ports: + - "5672:5672" + - "15672:15672" + volumes: + - ${WORKING_HOME}/freeleaps2-rabbitmq-data:/var/lib/rabbitmq + networks: + - devbox_freeleaps2-network + + devsvc: + container_name: devsvc + image: freeleaps/devsvc:${DEVSVC_IMAGE_TAG:-latest-linux-arm64} + restart: always + environment: + - APP_NAME=devsvc + - SERVICE_API_ACCESS_HOST=localhost + - SERVICE_API_ACCESS_PORT=8007 + - MONGODB_NAME=freeleaps2 + - MONGODB_URI=mongodb://freeleaps2-mongodb:27017/ + - GITEA_TOKEN=6786dc398b77d2a9c454b1943019425049deb667 + - GITEA_URL=http://freeleaps2-gitea:3000 + - CODE_DEPOT_HTTP_PORT=3443 + - CODE_DEPOT_SSH_PORT=22 + - CODE_DEPOT_DOMAIN_NAME=localhost + - RABBITMQ_HOST=freeleaps2-rabbitmq + - RABBITMQ_PORT=5672 + - LOG_BASE_PATH=/app/log/devsvc + - BACKEND_LOG_FILE_NAME=devsvc.log + - APPLICATION_ACTIVITY_LOG=devsvc-application.log + ports: + - 8007:8007 + command: + - /bin/sh + - -c + - | + uvicorn webapi.main:app --reload --port=8007 --host=0.0.0.0 + volumes: + - type: bind + source: ${WORKING_HOME}/logs/devsvc + target: /app/log/devsvc + networks: + - devbox_freeleaps2-network + + central_storage: + container_name: central_storage + image: freeleaps/central_storage:${CENTRAL_STORAGE_IMAGE_TAG:-latest-linux-arm64} + # profiles: [ prod, alpha, dev ] + platform: linux/${ARCH:-arm64} + restart: always + environment: + - APP_NAME=central_storage + - MONGODB_NAME=freeleaps2 + - MONGODB_PORT=27017 + - MONGODB_URI=mongodb://freeleaps2-mongodb:27017/ + - SERVICE_API_ACCESS_HOST=localhost + - SERVICE_API_ACCESS_PORT=8005 + - AZURE_STORAGE_DOCUMENT_API_KEY=Cg+wtKpHt6Bo6bTUtjic40cRNRZ8NCI3JYBY69BNPgFJARVx/c18iVC7cASbJfzukyu4pksyhUep+AStFdpH7Q== + - AZURE_STORAGE_DOCUMENT_API_ENDPOINT=https://freeleaps1document.blob.core.windows.net/ + - LOG_BASE_PATH=/app/log/central_storage + - BACKEND_LOG_FILE_NAME=central_storage.log + - APPLICATION_ACTIVITY_LOG=central_storage-application.log + ports: + - 8005:8005 + command: + - /bin/sh + - -c + - | + uvicorn webapi.main:app --reload --port=8005 --host=0.0.0.0 + networks: + - devbox_freeleaps2-network + volumes: + - type: bind + source: ${WORKING_HOME}/logs/central_storage + target: /app/log/central_storage + + authentication: + container_name: authentication + image: freeleaps/authentication:${AUTHENTICATION_IMAGE_TAG:-latest-linux-arm64} + # profiles: [ prod, alpha, dev ] + platform: linux/${ARCH:-arm64} + restart: always + environment: + - APP_NAME=authentication + - MONGODB_NAME=freeleaps2 + - MONGODB_PORT=27017 + - MONGODB_URI=mongodb://freeleaps2-mongodb:27017/ + - SERVICE_API_ACCESS_HOST=localhost + - SERVICE_API_ACCESS_PORT=8004 + - LOG_BASE_PATH=/app/log/authentication + - BACKEND_LOG_FILE_NAME=authentication.log + - APPLICATION_ACTIVITY_LOG=authentication-application.log + - NOTIFICATION_WEBAPI_URL_BASE=http://notification:8003/api/notification/ + - DEVSVC_WEBAPI_URL_BASE=http://devsvc:8007/api/devsvc + - JWT_SECRET_KEY=8f87ca8c3c9c3df09a9c78e0adb0927855568f6072d9efc892534aee35f5867b + - JWT_ALGORITHM=HS256 + ports: + - 8004:8004 + command: + - /bin/sh + - -c + - | + uvicorn webapi.main:app --reload --port=8004 --host=0.0.0.0 + networks: + - devbox_freeleaps2-network + volumes: + - type: bind + source: ${WORKING_HOME}/logs/authentication + target: /app/log/authentication + + content: + container_name: content + image: freeleaps/content:${CONTENT_IMAGE_TAG:-latest-linux-arm64} + # profiles: [ prod, alpha, dev ] + platform: linux/${ARCH:-arm64} + restart: always + environment: + - APP_NAME=content + - SERVICE_API_ACCESS_HOST=localhost + - SERVICE_API_ACCESS_PORT=8013 + - MONGODB_NAME=freeleaps2 + - MONGODB_URI=mongodb://freeleaps2-mongodb:27017/ + - FREELEAPS_WWW_AS_AZURE_CLIENT_SECRET=jTu8Q~WceiK-5dfZB44Ww-K4fVGi3_5tHNWYYbdX + - CENTRAL_STORAGE_WEBAPI_URL_BASE=http://central_storage:8005/api/central_storage/ + - LOG_BASE_PATH=/app/log/content + - BACKEND_LOG_FILE_NAME=content.log + - APPLICATION_ACTIVITY_LOG=content-application.log + ports: + - 8013:8013 + command: + - /bin/sh + - -c + - | + uvicorn webapi.main:app --reload --port=8013 --host=0.0.0.0 + networks: + - devbox_freeleaps2-network + volumes: + - type: bind + source: ${WORKING_HOME}/logs/content + target: /app/log/content + + notification: + container_name: notification + image: freeleaps/notification:${NOTIFICATION_IMAGE_TAG:-latest-linux-arm64} + # profiles: [ prod, alpha, dev ] + platform: linux/${ARCH:-arm64} + restart: always + environment: + - APP_NAME=notification + - SERVICE_API_ACCESS_HOST=localhost + - SERVICE_API_ACCESS_PORT=8003 + - RABBITMQ_HOST=freeleaps2-rabbitmq + - RABBITMQ_PORT=5672 + - SYSTEM_USER_ID=117f191e810c19729de860aa + - SMS_FROM=+16898887156 + - EMAIL_FROM=freeleaps@freeleaps.com + - SECRET_KEY=8f87ca8c3c9c3df09a9c78e0adb0927855568f6072d9efc892534aee35f5867b + - SENDGRID_API_KEY=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 + - TWILIO_ACCOUNT_SID=ACf8c9283a6acda060258eadb29be58bc8 + - TWILIO_AUTH_TOKEN=120165c0550111ddfd58efc97dafc2fe + - LOG_BASE_PATH=/app/log/notification + - BACKEND_LOG_FILE_NAME=notification.log + - APPLICATION_ACTIVITY_LOG=notification-application.log + ports: + - 8003:8003 + command: + - /bin/sh + - -c + - | + uvicorn webapi.main:app --reload --port=8003 --host=0.0.0.0 + networks: + - devbox_freeleaps2-network + volumes: + - type: bind + source: ${WORKING_HOME}/logs/notification + target: /app/log/notification + +volumes: + freeleaps2-mongodb-data: + freeleaps2-gitea-data: + freeleaps2-rabbitmq-data: + + +networks: + devbox_freeleaps2-network: + external: true diff --git a/devbox/devbox.local/cli/gitea_data_backup.tar.gz b/devbox/devbox.local/cli/gitea_data_backup.tar.gz new file mode 100644 index 0000000..550787f Binary files /dev/null and b/devbox/devbox.local/cli/gitea_data_backup.tar.gz differ diff --git a/devbox/devbox.local/docker-compose.dev.arm64.new.yaml b/devbox/devbox.local/docker-compose.dev.arm64.new.yaml index 23543d6..7c2861e 100644 --- a/devbox/devbox.local/docker-compose.dev.arm64.new.yaml +++ b/devbox/devbox.local/docker-compose.dev.arm64.new.yaml @@ -10,7 +10,8 @@ services: environment: - DISABLE_REGISTRATION=true - REQUIRE_SIGNIN_VIEW=true - volumes: ${WORKING_HOME}/freeleaps2-gitea:/data:Z + volumes: + - ${WORKING_HOME}/freeleaps2-gitea:/data:Z networks: - devbox_freeleaps2-network