一些常用的docker-compose

904666888
2月26日发布

NGINX proxy manger

1.汉化版

version: '3'
services:
  app:
    image: 'chishin/nginx-proxy-manager-zh:release'
    restart: always
    ports:
      - '80:80'
      - '81:81'
      - '443:443'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

2.原版

version: '3'
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80'  # 冒号左边可以改成自己服务器未被占用的端口
      - '81:81'  # 冒号左边可以改成自己服务器未被占用的端口
      - '443:443' # 冒号左边可以改成自己服务器未被占用的端口
    volumes:
      - ./data:/data # 冒号左边可以改路径,现在是表示把数据存放在在当前文件夹下的 data 文件夹中
      - ./letsencrypt:/etc/letsencrypt  

MySQL

version: '3'
services:
    mysql:
        container_name: mysql
        ports:
            - 3306:3306
        volumes:
            - ./log:/var/log/mysql
            - ./data:/var/lib/mysql
            - ./conf/my.cnf:/etc/my.cnf
        environment:
            - MYSQL_ROOT_PASSWORD=fanzihua@1982
        restart: always
        image: mysql:5.7

conf文件下载

PHPmyadmin

version: "3"
services:
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:latest
    container_name: phpmyadmin
    restart: always
    ports:
      - 3307:80
    environment:
      - PMA_ARBITRARY=1

Speedtest-x

version: '3'
services:
  speedtest-x:
    image: badapple9/speedtest-x
    ports:
      - "9898:80"
    stdin_open: true # 对应 -i 参数
    tty: true # 对应 -t 参数
    restart: always # 对应 -d 参数的类似效果,容器退出时自动重启

X-ui

services:
  xui:
    image: enwaiax/x-ui:alpha-zh
    container_name: xui
    volumes:
      - $PWD/db/:/etc/x-ui/
      - $PWD/cert/:/root/cert/
    restart: unless-stopped
    network_mode: host

Alist

version: '3.3'
services:
    alist:
        restart: always
        volumes:
            - './data:/opt/alist/data'
        ports:
            - '5244:5244'
        environment:
            - PUID=0
            - PGID=0
            - UMASK=022
        container_name: alist
        image: 'xhofe/alist-aria2:latest'

Frps

version: '3'
services:
  frps:
    image: snowdreamtech/frps
    container_name: frps
    restart: always
    network_mode: host
    volumes:
      - ./frps.toml:/etc/frp/frps.toml

frps.toml示例

bindPort = 7000
auth.token = "passwd"  # 设置一个安全的 token,用于客户端连接
webServer.addr = "0.0.0.0"
webServer.port = 7500      # Web 管理界面端口
webServer.user = "name"   # Web 管理界面用户名
webServer.password = "pass"  # Web 管理界面密码

Gogs

version: "3"
services:
  gogs:
    restart: always 
    image: gogs/gogs
    container_name: gogs
    ports:
      - "2222:22" 
      - "3000:3000" 
    volumes:
      - ./data:/data 

Guacamole

version: "3"
services:
  guacamole:
    image: jwetzell/guacamole
    container_name: guacamole
    volumes:
      - ./postgres:/config
    ports:
      - 8181:8080
volumes:
  postgres:
    driver: local

哪吒探针

version: '3'
services:
  nezha-dashboard: 
    image: ghcr.io/naiba/nezha-dashboard:latest
    restart: always
    volumes:
      - ./data:/dashboard/data #/docker-volume/nezha/data为自定义宿主机映射目录
    ports:
      - 19010:19010/tcp
      - 19011:19011/tcp

NPS

version: "3"
services:
nps:
  image: yisier1/nps:latest
  container_name: nps
  restart: always
  network_mode: "host"
  volumes:
    - ./conf:/conf
  

Typecho

version: '3.7'

services:
  typecho:
    image: joyqi/typecho:1.2.1-php7.4-apache
    container_name: typecho-server
    restart: always
    environment:
      - TYPECHO_SITE_URL=https://q1.work
    ports:
      - 90:80
    volumes:
      - ./data:/app/usr

portainer中文版

version: "2.1"
services:
  portainer:
    image: outlovecn/portainer-cn:latest
    container_name: portainer
    restart: always
    ports:
      - "9000:9000"
      - "8000:8000"
    volumes:
      - ./dockerconfig/portainer:/data
      - /var/run/docker.sock:/var/run/docker.sock

苹果CMS

version: '3.3'

services:
  # 苹果cms
  maccms:
    image: aoliyougei/maccms:v1.3
    restart: always
    ports:
      - 80:80
    container_name: maccms
    volumes:
      - ./:/var/www/

moneynote

version: '3'

services:
  moneynote:
    container_name: moneynote
    image: markliu2018/moneynote-all-no-mysql:latest
    restart: always
    extra_hosts:
      - "host.docker.internal:host-gateway"
    environment:
      - DB_HOST=
      - DB_PORT=3306
      - DB_NAME=moneynote
      - DB_USER=moneynote
      - DB_PASSWORD=
      - invite_code=
    ports:
      - "43742:9092"
      - "43743:81"
      - "43744:82"

postgresql

version: '3'
services:
  postgres:
    image: postgres:latest
    container_name: postgresql
    hostname: postgresql
    restart: always
    environment:
      POSTGRES_USER: 
      POSTGRES_PASSWORD: 
      POSTGRES_DB: 
      TZ: Asia/Shanghai
      PGTZ: Asia/Shanghai
    ports:
      - '5432:5432'
    volumes:
       - ./data:/var/lib/postgresql/data
  postgres-exporter:
    image: prometheuscommunity/postgres-exporter
    container_name: postgres-exporter
    hostname: postgres-exporter
    restart: always
    environment:
      DATA_SOURCE_NAME: postgresql://postgres:/postgres?sslmode=disable
    ports:
      - 9187:9187
  pgadmin:
    image: dpage/pgadmin4:latest
    container_name: pgadmin
    hostname: pgadmin
    restart: always
    environment: 
      PGADMIN_DEFAULT_EMAIL: 
      PGADMIN_DEFAULT_PASSWORD: 
    ports:
      - "5433:80"

rustdesk

version: '3'

networks:
  rustdesk-net:
    external: false

services:
  hbbs:
    container_name: hbbs
    ports:
      - 21115:21115
      - 21116:21116 # 自定义 hbbs 映射端口
      - 21116:21116/udp # 自定义 hbbs 映射端口
    image: rustdesk/rustdesk-server
    command: hbbs -r 182.92.67.234:21117 # 填入个人域名或 IP + hbbr 暴露端口
    volumes:
      - ./:/root # 自定义挂载目录
    networks:
      - rustdesk-net
    depends_on:
      - hbbr
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 64M

  hbbr:
    container_name: hbbr
    ports:
      - 21117:21117 # 自定义 hbbr 映射端口
    image: rustdesk/rustdesk-server
    command: hbbr
    volumes:
      - ./:/root # 自定义挂载目录
    networks:
      - rustdesk-net
    restart: unless-stopped
    deploy:
      resources:
        limits:
          memory: 64M

Wordpress

version: '3'

services:
  wordpress:
    image: wordpress:latest
    ports:
      - "8686:80"
    environment:
      WORDPRESS_DB_HOST: 43.161.216.179:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: fanzihua1982
      WORDPRESS_DB_NAME: wordpress
    volumes:
      - ./wordpress_data:/var/www/html
    restart: always
© 版权声明
THE END
喜欢就支持一下吧
点赞 0 分享 收藏
评论
所有页面的评论已关闭
易航博客