基于docker compose运行常用软件

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
运维

gitlab

2024-10-23 20:17:19

c++

c++ 库 标准库 系统库 三方库

2024-10-27 17:25:17

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索