1 Star 0 Fork 3

程才/SummerDocker

forked from summer/SummerDocker 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
docker-compose.yml 5.93 KB
一键复制 编辑 原始数据 按行查看 历史
QQxin 提交于 2024-07-18 12:39 . feat: 添加微服务sql备份
services:
#redis
redis-server:
image: redis:7.2.4
restart: on-failure
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
hostname: redis-server
container_name: redis-server
privileged: true
environment:
TZ: Asia/Shanghai
volumes:
- ./redis/conf:/usr/local/redis/conf
- ./redis/data:/data
- ./redis/logs:/logs
networks:
- server-net
ports:
- "6379:6379"
command: [ "redis-server", "/usr/local/redis/conf/redis.conf" ]
#postgresql
postgresql-server:
image: postgres:13.15
hostname: postgresql-server
container_name: postgresql-server
restart: on-failure
mem_limit: 256m
deploy:
resources:
limits:
cpus: '1.00'
memory: 256m
reservations:
cpus: '0.50'
memory: 256m
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: Aabbcc229913!
POSTGRES_DB: postgres
ALLOW_IP_RANGE: 0.0.0.0/0
volumes:
- ./postgresql/data:/var/lib/postgresql/data
ports:
- "5433:5432"
#mysql
mysql-server:
image: mysql:8.0
hostname: mysql-server
container_name: mysql-server
restart: on-failure
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
environment:
TZ: Asia/Shanghai
MYSQL_ROOT_PASSWORD: Aabbcc229913!
MYSQL_DATABASE: nacos
MYSQL_USER: admin
MYSQL_PASSWORD: Aabbcc229913!
networks:
- server-net
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/logs:/var/log/mysql
ports:
- "3306:3306"
#nacos
nacos-server:
image: nacos/nacos-server:v2.3.2-slim
hostname: nacos-server
container_name: nacos-server
restart: on-failure
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
env_file:
- ./nacos/conf/nacos_config.env
volumes:
- ./nacos/logs:/home/nacos/logs
- ./nacos/data:/home/nacos/data
networks:
- server-net
links:
- mysql-server
depends_on:
- mysql-server
ports:
- "8848:8848"
- "9848:9848"
#rabbitmq
rabbitmq-server:
image: rabbitmq:3.12-management
hostname: rabbitmq-server
container_name: rabbitmq-server
restart: on-failure
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
environment:
TZ: Asia/Shanghai
RABBITMQ_DEFAULT_USER: guest
RABBITMQ_DEFAULT_PASS: guest
volumes:
- ./rabbitmq/data:/var/lib/rabbitmq/mnesia
- ./rabbitmq/conf/rabbitmq.conf:/etc/rabbitmq/rabbitmq.conf
networks:
- server-net
ports:
- "5672:5672"
- "15672:15672"
#minio
minio-server:
image: bitnami/minio:2024.4.6
hostname: minio-server
container_name: minio-server
restart: on-failure
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
environment:
TZ: Asia/Shanghai
MINIO_SERVER_HOST: minio
MINIO_ROOT_USER: minioAdmin
MINIO_ROOT_PASSWORD: minioAdmin
volumes:
- ./minio/data:/data
ports:
- "9000:9000"
- "9001:9001"
networks:
- server-net
#seata
seata-server:
image: seataio/seata-server:2.0.0-slim
hostname: seata-server
container_name: seata-server
restart: on-failure
mem_limit: 2048m
deploy:
resources:
limits:
memory: 2048m
environment:
- SEATA_PORT=8091
#这里需要填入能被访问到的ip,注册到nacos的就是这个ip
- SEATA_IP=127.0.0.1
- SEATA_CONFIG_NAME=file:/root/seata-config/registry
volumes:
- ./seata/logs:/root/logs
- ./seata/conf/application.yml:/seata-server/resources/application.yml
depends_on:
- nacos-server
- mysql-server
links:
- nacos-server
- mysql-server
networks:
- server-net
ports:
- "8091:8091"
- "7091:7091"
#sentinel
sentinel-server:
image: sentinel:1.8.0
hostname: sentinel-server
container_name: sentinel-server
restart: on-failure
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
env_file:
- ./sentinel/conf/conf.env
volumes:
- ./sentinel/logs:/usr/local/logs
depends_on:
- nacos-server
- mysql-server
links:
- nacos-server
- mysql-server
networks:
- server-net
ports:
- "9999:9999"
#xxljob
xxljob-server:
image: xxljob:1.0
hostname: xxljob-server
container_name: xxljob-server
restart: on-failure
mem_limit: 512m
deploy:
resources:
limits:
memory: 512m
env_file:
- xxljob/conf/conf.env
volumes:
- ./xxljob/logs:/usr/local/logs
depends_on:
- nacos-server
- mysql-server
links:
- nacos-server
- mysql-server
networks:
- server-net
ports:
- "9093:9093"
# #portainer
# portainer-server:
# image: portainer/portainer:linux-arm64-2.0.1
# hostname: portainer-server
# container_name: portainer-server
# restart: on-failure
# mem_limit: 512m
# deploy:
# resources:
# limits:
# memory: 512m
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock
# - ./portainer/data:/data
# # portainer汉化包
# - ./portainer/public:/public
# ports:
# - "19000:9000"
#
# jpom-server:
# #MFA key: PFVHLCBWTEURTXQXPPXWCHPBKBDRVCQG
# #user: a-xin
# #password: Aabbcc229913!
# image: jpomdocker/jpom:2.11.8
# hostname: jpom-server
# container_name: jpom-server
# restart: always
# environment:
# "jpom.authorize.token": 7094f673-2c53-4fc1-82e7-86e528449d97
# volumes:
# - ./jpom/data:/usr/local/jpom-server/data
# - ./jpom/logs:/usr/local/jpom-server/logs
# - ./jpom/conf:/usr/local/jpom-server/conf
# ports:
# - "2122:2122"
# - "2123:2123"
networks:
server-net:
driver: bridge
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/cai888/SummerDocker.git
git@gitee.com:cai888/SummerDocker.git
cai888
SummerDocker
SummerDocker
master

搜索帮助