基于Docker的All In One(NextCloud、Jellyfin、portainer、Mysql)

Mysql文件

# For advice on how to change settings please see
# http://dev.mysql.com/doc/refman/8.0/en/server-configuration-defaults.html

[mysqld]
#
# Remove leading # and set to the amount of RAM for the most important data
# cache in MySQL. Start at 70% of total RAM for dedicated server, else 10%.
innodb_buffer_pool_size = 128M
#
# Remove leading # to turn on a very important data integrity option: logging
# changes to the binary log between backups.
log-bin=mysql-bin
#
# Remove leading # to set options mainly useful for reporting servers.
# The server defaults are faster for transactions and fast SELECTs.
# Adjust sizes as needed, experiment to find the optimal values.
join_buffer_size = 128M
sort_buffer_size = 2M
read_rnd_buffer_size = 2M

# Remove leading # to revert to previous value for default_authentication_plugin,
# this will increase compatibility with older clients. For background, see:
# https://dev.mysql.com/doc/refman/8.0/en/server-system-variables.html#sysvar_default_authentication_plugin
# default-authentication-plugin=mysql_native_password
skip-host-cache
skip-name-resolve
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
secure-file-priv=/var/lib/mysql-files
user=mysql
server-id=2
pid-file=/var/run/mysqld/mysqld.pid

docker-compose.yml

version: '3.7'
volumes:
  portainer_data: {}
networks:
  home_work:
    driver: bridge
    ipam:
      config:
        - subnet: 172.26.0.0/24
services:
  portainer:
    image: portainer/portainer
    container_name: portainer
    ports:
      - 19000:9000
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - portainer_data:/data
    restart: always
    logging:
      options:
        max-size: '1024m'
        max-file: '5'
      driver: json-file
  
  mysql:
    image: mysql/mysql-server:8.0
    container_name: mysql
    ports:
      - 13306:3306
    volumes:
      - /home/mysql/data:/var/lib/mysql
      - /home/mysql/conf/my.cnf:/etc/my.cnf
    environment:
      MYSQL_ROOT_PASSWORD: Love.903960669
      MYSQL_DATABASE: next_cloud
      MYSQL_USER: admin
      MYSQL_PASSWORD: Love.903960669
    restart: always
    networks:
      home_work:
        ipv4_address: 172.26.0.201
    logging:
      options:
        max-size: '1024m'
        max-file: '5'
      driver: json-file

  nextcloud:
    image: nextcloud
    container_name: nextcloud
    ports:
      - 18095:80
    volumes:
      - /home/nextcloud/custom_apps:/var/www/html/custom_apps
      - /home/nextcloud/config:/var/www/html/config
      - /home/media:/var/www/html/data
    restart: always
    networks:
      home_work:
        ipv4_address: 172.26.0.101
    environment:
      MYSQL_DATABASE: next_cloud
      MYSQL_USER: admin
      MYSQL_PASSWORD: Love.903960669
      MYSQL_HOST: 172.26.0.201:3306
    logging:
      options:
        max-size: '1024m'
        max-file: '5'
      driver: json-file

  jellyfin:
    image: jellyfin/jellyfin
    container_name: jellyfin
    ports:
      - 18096:8096
    volumes:
      - /home/jellyfin/config:/config
      - /home/jellyfin/cache:/cache
      - /home/media:/media
    restart: "always"
    logging:
      options:
        max-size: '1024m'
        max-file: '5'
      driver: json-file
    networks:
      home_work:
        ipv4_address: 172.26.0.102

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值