给大家写一个docker-flle
nextcloud+mariadb+redis+onlyoffice和portainer和jellyfin和odoo的一个大集合,也是我目前在用的,配合ddnsv6或者zerotier进行穿透,感觉还可以
wordpres直接使用ipv6(我用的腾讯云的)进行解析,也是好用的,唯一要注意的是:如果访问的人使用的ipv4,那就不能正常访问。
docker的磁盘映射,我是挂的硬盘做主目录,你们可以自己修改到自己喜欢的位置
少部分配置文件,如果有需要,可以留言,我看到了会回复。
version: '2.21.0'
services:
mariadb:
image: mariadb
restart: unless-stopped
expose:
- "3306"
container_name: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-file-per-table=1 --skip-innodb-read-only-compressed
volumes:
- /etc/localtime:/etc/localtime
- /home/docker/mariadb:/var/lib/mysql
# - /home/install_peizhi/sources.list:/etc/apt/sources.list
environment:
- MARIADB_ROOT_PASSWORD=*** # 密码自己设置
- MARIADB_DATABASE=*** # nextcloud 数据库名字,自己设置
- MARIADB_DATABASE=*** # wordpress 数据库名字,自己设置
cache:
image: redis
restart: unless-stopped
expose:
- "6379"
container_name: cache
volumes:
- /etc/localtime:/etc/localtime
- /cache:/data
# - /home/install_peizhi/sources.list:/etc/apt/sources.list
command: redis-server --requirepass '**' # redis密码自己设置
nextcloud:
image: nextcloud
restart: unless-stopped
ports:
- 9005:80
container_name: nextcloud
volumes:
- /home/docker/nextcloud:/var/www/html
# - /home/install_peizhi/sources.list:/etc/apt/sources.list
- /etc/localtime:/etc/localtime
environment:
- PHP_MEMORY_LIMIT=20000M
- PHP_UPLOAD_LIMIT=20000M
- NEXTCLOUD_DB_NAME=nextcloud
links:
- mariadb:nextcloud_db
- cache:cache
depends_on:
- mariadb
- cache
portainer:
image: portainer/portainer-ce
restart: always
ports:
- 9003:9000
container_name: portainer-ce
volumes:
- /home/docker/portainer-ce:/data
- /var/run/docker.sock:/var/run/docker.sock
onlyoffice:
image: onlyoffice/documentserver
restart: unless-stopped
ports:
- 9006:80
container_name: onlyoffice
volumes:
- /home/docker/onlyoffice/log:/var/log/onlyoffice
- /home/docker/onlyoffice/data:/var/www/onlyoffice/Data
- /home/docker/onlyoffice/lib:/var/lib/onlyoffice
- /home/docker/onlyoffice/db:/var/lib/postgresql
- /etc/localtime:/etc/localtime
# - /home/install_peizhi/sources.list:/etc/apt/sources.list
environment:
- JWT_ENABLED=true
- JWT_IN_BODY=true
- JWT_SECRET=*** # 密码自己设置
- JWT_HEADER=AuthorizationJwt #也可以不使用这个方式认证
jellyfin:
image: linuxserver/jellyfin
restart: unless-stopped
ports:
- 8096:8096
container_name: jellyfin
volumes:
- /home/docker/jellyfin/config:/config
- /home/docker/jellyfin/tvseries:/data/tvshows
- /home/docker/jellyfin/movies:/data/movies
- /etc/localtime:/etc/localtime
# - /home/install_peizhi/sources.list:/etc/apt/sources.list
wordpress:
image: wordpress
restart: unless-stopped
ports:
- 9500:80
container_name: wordpress
volumes:
- /home/docker/wordpress:/var/www/html
- /etc/localtime:/etc/localtime
# - /home/install_peizhi/sources.list:/etc/apt/sources.list
- /home/install_peizhi/php.ini:/var/www/html/php.ini
environment:
- WORDPRESS_DB_HOST=mariadb
- WORDPRESS_DB_USER=root
- WORDPRESS_DB_PASSWORD=*** #密码自己设置
- WORDPRESS_DB_NAME=*** #数据库名字用自己的
depends_on:
- mariadb
links:
- mariadb:wp_db
lx-music:
image: esme518/docker-lx-music-sync-server
restart: unless-stopped
ports:
- 9527:9527
container_name: lx-music
environment:
- BIND_IP=* # 如果要使用这个服务器,这里填写的是你绑定的域名
- LX_USER_user1=* #这是密码
odoo:
image: odoo
restart: unless-stopped
ports:
- 8069:8069
container_name: odoo
volumes:
- /home/docker/odoo/extra-addons:/mnt/extra-addons
- /home/docker/odoo/lib/odoo:/var/lib/odoo
depends_on:
- postgres
links:
- postgres:db
postgres:
image: postgres
restart: unless-stopped
container_name: postgres
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=*** # 密码自己设置
- POSTGRES_USER=odoo
volumes:
- /home/docker/postgres/data:/var/lib/postgresql/data
# 如有需要ipv6,可以使用以下方式启用
#networks:
# local_bridge:
# enable_ipv6: true
# driver: bridge
# ipam:
# config:
# - subnet: "fd00:1001::/80"
|