forked from freeleaps/freeleaps-pub
Merged PR 22: Merge devbox CLI to master branch
Merge devbox CLI into the master branch as most features are now complete: 1. Unified script for Init, Deinit, Stop, Start, Restart, and Status commands 2. Reliable initialization of devbox using local or online component services
This commit is contained in:
commit
912aa39196
2898
devbox/devbox.local/cli/devbox
Normal file
2898
devbox/devbox.local/cli/devbox
Normal file
File diff suppressed because it is too large
Load Diff
266
devbox/devbox.local/cli/docker-compose.dev.arm64.new.yaml
Normal file
266
devbox/devbox.local/cli/docker-compose.dev.arm64.new.yaml
Normal file
@ -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
|
||||||
BIN
devbox/devbox.local/cli/gitea_data_backup.tar.gz
Normal file
BIN
devbox/devbox.local/cli/gitea_data_backup.tar.gz
Normal file
Binary file not shown.
0
devbox/devbox.local/docker-compose.dev.arm64.new.yaml
Executable file → Normal file
0
devbox/devbox.local/docker-compose.dev.arm64.new.yaml
Executable file → Normal file
Loading…
Reference in New Issue
Block a user