DockerCompose安装postgres、nginx、redis、rabbitmq、mongodb、nacos、yapi、jenkins、mysqlmysqlpostgres等中间件汇总
以下是一个简化版的Docker Compose配置文件示例,它包括了Postgres、Nginx、Redis、RabbitMQ、MongoDB、Nacos、Yapi和Jenkins的安装。
version: '3'
services:
postgres:
image: postgres:latest
environment:
POSTGRES_DB: yourdb
POSTGRES_USER: youruser
POSTGRES_PASSWORD: yourpassword
ports:
- "5432:5432"
nginx:
image: nginx:latest
ports:
- "80:80"
- "443:443"
redis:
image: redis:latest
ports:
- "6379:6379"
rabbitmq:
image: rabbitmq:management
ports:
- "5672:5672"
- "15672:15672"
mongodb:
image: mongo:latest
ports:
- "27017:27017"
nacos:
image: nacos/nacos-server
environment:
MODE: standalone
ports:
- "8848:8848"
yapi:
image: mongo:latest
ports:
- "3000:3000"
jenkins:
image: jenkins/jenkins:lts
ports:
- "8080:8080"
- "50000:50000"
volumes:
- ./jenkins_home:/var/jenkins_home
这个配置文件定义了一个Docker Compose管理的服务列表,每个服务都使用了最新的官方镜像,并映射了必要的端口。注意,Yapi和Nacos可能需要额外的配置来满足实际生产环境的需求,比如持久化数据卷的配置。而Jenkins的卷也应该包含任何自定义配置或插件的路径。
评论已关闭