1 Star 0 Fork 148

chne/jenkins-saas-housekeeper

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 7.99 KB
一键复制 编辑 原始数据 按行查看 历史
yang 提交于 2023-05-11 20:12 . docker-compose dev分支代码回退
version: '3.3'
## 本地调试连接rabbitmq,mysql组件,需要将docker网络映射至主机。在host文件增加配置: 127.0.0.1 kubernetes.docker.internal
services:
#rabbitmq
rabbitmq:
image: rabbitmq:3.9-alpine
container_name: rabbitmq
hostname: rabbitmq
ports:
- "5672:5672"
- "15672:15672"
expose:
- 5672
volumes:
- type: bind
source: ./rabbitmq-enabled-plugins
target: /etc/rabbitmq/enabled_plugins
- type: bind
source: ./rabbitmq.config
target: /etc/rabbitmq/rabbitmq.config
- type: bind
source: ./rabbitmq-defs.json
target: /etc/rabbitmq/rabbitmq-defs.json
deploy:
resources:
limits:
cpus: '0.25'
memory: 200M
reservations:
memory: 100M
#mysql
mysql:
image: mysql:8.0
container_name: mysql
hostname: mysql
volumes:
- ./my.cnf:/etc/my.cnf #加载mysql的配置文件
- ./db:/docker-entrypoint-initdb.d #初始化mysql脚本
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
expose:
- 3306
deploy:
resources:
limits:
cpus: '0.25'
memory: 600M
reservations:
memory: 600M
#eureka
eureka-server:
build: ./saas-housekeeper-eureka
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
ports:
- "8761:8761"
depends_on:
- rabbitmq
- mysql
environment:
WAIT_HOSTS: rabbitmq:5672, mysql:3306
#config
config-server:
container_name: config-server
build: ./saas-housekeeper-config-server
ports:
- "3344:3344"
expose:
- 3344
depends_on:
- eureka-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: eureka:8761
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#tenantinfo
tenantinfo:
build: ./saas-housekeeper-tenantinfo-service
ports:
- "8500:8500"
expose:
- 8500
depends_on:
- config-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344, mysql:3306
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#userinfo
userinfo:
build: ./saas-housekeeper-userinfo-service
ports:
- "9093:9093"
depends_on:
- config-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344, mysql:3306
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#task
task:
build: ./saas-housekeeper-task-service
ports:
- "8090:8090"
depends_on:
- config-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344, mysql:3306
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#order
order:
build: ./saas-housekeeper-order-service
ports:
- "8300:8300"
depends_on:
- config-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344, mysql:3306
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#publish
publish:
build: ./saas-housekeeper-publish-service
ports:
- "8080:8080"
depends_on:
- config-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344, mysql:3306
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#message
message:
build: ./saas-housekeeper-message-service
ports:
- "8175:8175"
depends_on:
- config-server
- mysql
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344, mysql:3306
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#gateway
gateway:
build: ./saas-housekeeper-gateway
ports:
- "9090:9090"
expose:
- 9090
depends_on:
- config-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#event-tracking
event-tracking:
build: ./saas-housekeeper-event-tracking
ports:
- "8600:8600"
expose:
- 8600
depends_on:
- config-server
deploy:
resources:
limits:
cpus: '0.25'
memory: 250M
reservations:
memory: 250M
environment:
WAIT_HOSTS: config-server:3344, mysql:3306
SPRING_PROFILES_ACTIVE: dev
EUREKA_URI: http://eurekaAdmin:123456@eureka-server:8761/eureka
CONFIG_SERVER: http://config-server:3344
RABBIT_HOST: rabbitmq
LANG: C.UTF-8
MYSQL_HOST: mysql
MYSQL_ROOT_HOST: "%"
MYSQL_ROOT_PASSWORD: 1234
MYSQL_DATABASE: mysql
REDIS_HOST: redis
#frontend
frontend:
build:
context: .
dockerfile: Dockerfile
ports:
- "80:80"
depends_on:
- tenantinfo
- event-tracking
- gateway
deploy:
resources:
limits:
cpus: '0.25'
memory: 60M
reservations:
memory: 60M
environment:
WAIT_HOSTS: tenantinfo:8500, event-tracking:8600, gateway:9090
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/chne_y/saas-housekeeper.git
git@gitee.com:chne_y/saas-housekeeper.git
chne_y
saas-housekeeper
jenkins-saas-housekeeper
master-dev

搜索帮助