2 Star 2 Fork 1

sky/laf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 6.32 KB
一键复制 编辑 原始数据 按行查看 历史
maslow 提交于 2022-10-22 18:56 . deploy: fix docker compose yml
# !!! This compose file only for development use
version: '3.8'
services:
mongo:
# image: bitnami/mongodb:5.0.8
image: bitnami/mongodb:4.4.13 # Use this version for Apple M1 Chip
healthcheck:
test: echo 'db.runCommand({serverStatus:1}).ok' | mongo admin -u root -p password123 --quiet | grep 1
interval: 6s
timeout: 10s
retries: 30
start_period: 120s
environment:
- MONGODB_REPLICA_SET_MODE=primary
- MONGODB_ADVERTISED_HOSTNAME=mongo
- MONGODB_REPLICA_SET_NAME=laf
- MONGODB_REPLICA_SET_KEY=replicasetkey123
- MONGODB_ENABLE_DIRECTORY_PER_DB=yes
- MONGODB_ROOT_PASSWORD=password123
- MONGODB_USERNAME=my_user
- MONGODB_PASSWORD=password123
- MONGODB_DATABASE=laf-sys
volumes:
- db-data:/bitnami/mongodb
ports:
- "27017:27017"
networks:
- laf_shared_network
etcd:
image: quay.io/coreos/etcd:v3.5.4
environment:
- ETCD_ADVERTISE_CLIENT_URLS=http://etcd:2379
- ETCD_LISTEN_CLIENT_URLS=http://0.0.0.0:2379
volumes:
- etcd-data:/default.etcd
ports:
- 2379
- 2380
networks:
- laf_shared_network
oss:
image: 'minio/minio:RELEASE.2022-08-13T21-54-44Z'
environment:
- MINIO_ROOT_USER=minio-root-user
- MINIO_ROOT_PASSWORD=minio-root-password
- MINIO_REGION_NAME=cn-default
- MINIO_DOMAIN=oss.127-0-0-1.nip.io
command: ["minio", "server", "/data/{0...3}", "--console-address", ":9001"]
ports:
- "9020:9000"
- "9120:9001"
volumes:
- oss-data:/data
networks:
- laf_shared_network
system-server:
build: ./packages/system-server
user: root
working_dir: /app
environment:
SYS_DB_URI: mongodb://my_user:password123@mongo:27017/?authSource=laf-sys&replicaSet=laf&writeConcern=majority
APP_DB_URI: mongodb://root:password123@mongo:27017/?authSource=admin&replicaSet=laf&writeConcern=majority
SYS_SERVER_SECRET_SALT: Rewrite_Your_Own_Secret_Salt_abcdefg1234567
LOG_LEVEL: debug
ACCOUNT_DEFAULT_APP_QUOTA: 5
ACCOUNT_SIGNUP_MODE: 0
APP_SERVICE_IMAGE: lafyun/app-service:latest
APP_SERVICE_DEPLOY_HOST: 127-0-0-1.nip.io # `*.127-0-0-1.nip.io` always resolved to 127.0.0.1, used to local development
APP_SERVICE_DEPLOY_URL_SCHEMA: 'http'
MINIO_ACCESS_KEY: minio-root-user
MINIO_ACCESS_SECRET: minio-root-password
MINIO_INTERNAL_ENDPOINT: http://oss:9000
MINIO_EXTERNAL_ENDPOINT: http://oss.127-0-0-1.nip.io:${PUBLISH_PORT:-8080}
PUBLISH_PORT: ${PUBLISH_PORT:-8080}
PUBLISH_HTTPS_PORT: ${PUBLISH_HTTPS_PORT:-9443}
MINIO_REGION_NAME: cn-default
INIT_ROOT_ACCOUNT_PASSWORD: abc123
INIT_ROOT_ACCOUNT: root
SYSTEM_EXTENSION_APPID: '000000'
APPID_LENGTH: 6
command: dockerize -wait tcp://mongo:27017 -wait http://oss:9001 -timeout 60s sh /app/start.sh
volumes:
- ./packages/system-server:/app
- ./packages/database-proxy:/app/node_modules/database-proxy:ro
- ./packages/database-ql:/app/node_modules/database-ql:ro
- ./packages/database-ql:/app/node_modules/database-proxy/node_modules/database-ql:ro
ports:
- "9000"
depends_on:
- mongo
restart: always
networks:
- laf_shared_network
instance-controller:
build: ./packages/instance-controller
user: root
working_dir: /app
depends_on:
- mongo
environment:
SCHEDULER_INTERVAL: 1000
SYS_DB_URI: mongodb://my_user:password123@mongo:27017/?authSource=laf-sys&replicaSet=laf&writeConcern=majority
APP_DB_URI: mongodb://root:password123@mongo:27017/?authSource=admin&replicaSet=laf&writeConcern=majority
SHARED_NETWORK: laf_shared_network
LOG_LEVEL: debug
SERVICE_DRIVER: docker
APP_SERVICE_ENV_NPM_INSTALL_FLAGS: ' --no-audit --no-fund'
MINIO_INTERNAL_ENDPOINT: http://oss:9000
MINIO_EXTERNAL_ENDPOINT: http://oss.127-0-0-1.nip.io:${PUBLISH_PORT:-8080}
PUBLISH_PORT: ${PUBLISH_PORT:-8080}
PUBLISH_HTTPS_PORT: ${PUBLISH_HTTPS_PORT:-9443}
MINIO_REGION_NAME: cn-default
DEBUG_BIND_HOST_APP_PATH: '${PWD}/packages/app-service'
SYSTEM_EXTENSION_APPID: '000000'
command: node ./dist/index.js
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./packages/instance-controller:/app
ports:
- "9000"
depends_on:
- mongo
restart: always
networks:
- laf_shared_network
gateway:
image: apache/apisix:2.14.1-alpine
depends_on:
- etcd
volumes:
- ./gateway_conf.yaml:/usr/local/apisix/conf/config.yaml:ro
ports:
- 8080:9080
- 9443:9443
networks:
- laf_shared_network
gateway-controller:
build: ./packages/gateway-controller
user: root
working_dir: /app
depends_on:
- mongo
- gateway
environment:
DEPLOY_DOMAIN: 127-0-0-1.nip.io
DEPLOY_OSS_DOMAIN: oss.127-0-0-1.nip.io
SYS_CLIENT_HOST: console.127-0-0-1.nip.io
LOG_LEVEL: debug
SERVICE_DRIVER: docker
GATEWAY_TYPE: apisix
SYS_DB_URI: mongodb://my_user:password123@mongo:27017/?authSource=laf-sys&replicaSet=laf&writeConcern=majority
API_SIX_KEY: edd1c9f034335f136f87ad84b625c8f1
APP_SERVICE_DEPLOY_URL_SCHEMA: 'http'
command: node ./dist/index.js
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./packages/gateway-controller:/app
- ./cert:/ssl
restart: always
networks:
- laf_shared_network
apisix-dashboard:
image: apache/apisix-dashboard:2.13-alpine
restart: always
volumes:
- ./gateway_dashboard_conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
ports:
- "9000:9000"
networks:
- laf_shared_network
laf-web:
build: ./packages/web
volumes:
- ./packages/web/dist:/app
networks:
- laf_shared_network
system-client:
build: ./packages/system-client
volumes:
- ./packages/system-client/dist:/app
networks:
- laf_shared_network
app-console:
build: ./packages/app-console
volumes:
- ./packages/app-console/dist:/app
networks:
- laf_shared_network
pull-app-service-image:
image: lafyun/app-service:latest
command: echo 'pulled app-service image successful!'
volumes:
db-data:
oss-data:
etcd-data:
networks:
laf_shared_network:
external: true
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/clfsky/laf.git
git@gitee.com:clfsky/laf.git
clfsky
laf
laf
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385