version: '3'
services:
mysql:
image: mysql:5.7.31
container_name: mysql
restart: always
command: --character-set-server=utf8 --collation-server=utf8_general_ci
ports:
- 10144:3306
environment:
MYSQL_ROOT_PASSWORD: 123456
MYSQL_ROOT_HOST: '%'
volumes:
- /var/docker/mysql/data:/var/lib/mysql
- /var/docker/mysql/config:/etc/mysql/conf.d
redis:
image: redis:6.0.6
container_name: myRedis
restart: always
ports:
- 10145:6379
volumes:
- /var/redis/data:/data:rw
- /usr/local/redis/redis.conf:/etc/redis/redis.conf:rw
command:
redis-server /etc/redis/redis.conf
rabbitmq:
image: rabbitmq:management
container_name: myrabbitmq
hostname: myrabbitmq
ports:
- 10142:5672
- 10143:15672
volumes:
- /var/docker/rabbitmq/data:/var/lib/rabbitmq
environment:
- RABBITMQ_DEFAULT_USER=admin
- RABBITMQ_DEFAULT_PASS=123456