services:
redis:
container_name: redis
image: redis:6.2.7
restart: always
privileged: true
ports:
- "6379:6379"
volumes:
- redis-data:/data
- type: bind
source: E:\docker\redis/redis.conf
target: /etc/redis/redis.conf
command: redis-server /etc/redis/redis.conf --appendonly yes
networks:
- mypc-server
mongodb:
container_name: mongodb
image: mongo:5.0.7
restart: always
privileged: true
ports:
- "27017:27017"
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
- MONGO_INITDB_ROOT_PASSWORD=admin
volumes:
- mongo:/data/db
networks:
- mypc-server
mysql:
image: mysql:8.0.22
container_name: mysql
privileged: true
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
volumes:
- mysql-data:/var/lib/mysql:rw
networks:
- mypc-server
restart: always
command:
--character-set-server=utf8mb4
--collation-server=utf8mb4_unicode_ci
volumes:
mongo:
mysql-data:
redis-data:
networks:
mypc-server:
driver: bridge
ipam:
config:
- subnet: 172.20.0.0/16
暂无讨论,说说你的看法吧