Dockerhub
18088779852/lwl-php74-all-ext
docker-compose.yml
version: '3.5'
services:
nginx:
container_name: nginx
image: nginx:latest
restart: always
volumes:
- ./config/nginx:/etc/nginx/conf.d
- ./logs/nginx:/var/log/nginx
- ./projects:/projects
links:
- php74
- php81
ports:
- 80:80
- 443:443
php74:
container_name: php74
working_dir: /projects
image: 18088779852/lwl-php74-all-ext
restart: always
volumes:
- './projects:/projects'
ports:
- 9000:9000
php81:
container_name: php81
working_dir: /projects
image: 5353920/php74:v2
restart: always
volumes:
- './projects:/projects'
ports:
- 9001:9001
mysql-master:
container_name: mysql-master
image: mysql:8.0.26
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
platform: linux/x86_64
mysql-slave-1:
container_name: mysql-slave-1
image: mysql:8.0.26
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
ports:
- 3307:3306
platform: linux/x86_64
redis-master:
image: redis
container_name: redis-master
restart: always
command: redis-server --requirepass 123456 --appendonly yes
ports:
- 6379:6379
volumes:
- ./config/redis/redis-master:/data
redis-slave-1:
image: redis
container_name: redis-slave-1
restart: always
command: redis-server --slaveof redis-master 6379 --requirepass 123456 --masterauth 123456 --appendonly yes
ports:
- 6380:6379
volumes:
- ./config/redis/redis-slave-1:/data
redis-slave-2:
image: redis
container_name: redis-slave-2
restart: always
command: redis-server --slaveof redis-master 6379 --requirepass 123456 --masterauth 123456 --appendonly yes
ports:
- 6381:6379
volumes:
- ./config/redis/redis-slave-2:/data
redis-sentinel-1:
image: redis
container_name: redis-sentinel-1
restart: always
ports:
- 26379:26379
command: redis-sentinel /usr/local/etc/redis/sentinel.conf
volumes:
- ./config/redis-sentinel/redis-sentinel-1.conf:/usr/local/etc/redis/sentinel.conf
redis-sentinel-2:
image: redis
container_name: redis-sentinel-2
restart: always
ports:
- 26380:26379
command: redis-sentinel /usr/local/etc/redis/sentinel.conf
volumes:
- ./config/redis-sentinel/redis-sentinel-2.conf:/usr/local/etc/redis/sentinel.conf
redis-sentinel-3:
image: redis
container_name: redis-sentinel-3
ports:
- 26381:26379
command: redis-sentinel /usr/local/etc/redis/sentinel.conf
volumes:
- ./config/redis-sentinel/redis-sentinel-3.conf:/usr/local/etc/redis/sentinel.conf
dns:
container_name: dns
image: jpillora/dnsmasq
restart: always
ports:
- 53:53/udp
- 5380:8080
volumes:
- './config/dns/dnsmasq.conf:/etc/dnsmasq.conf'
rabbitmq:
container_name: rabbitmq
hostname: rabbitmq
image: rabbitmq:management
ports:
- 15673:15672
- 5673:5672
restart: always
volumes:
- ./config/rabbitmq:/var/lib/rabbitmq
mongo:
container_name: mogodb
image: vulfocus/mogodb-cve_2013_1892
restart: always
ports:
- 27017:27017
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: root
mysql主从复制 redis 主从复制 哨兵模式