HumHub, a social media platform solution

This article was completed in 3mid-month, and the reverse proxy still adopts frp + npmthe scheme. Because it has not been filed, it needs to bring a port when accessing;

What is HumHub?

HumHubis an open source social networking platform with various use cases such as a social intranet, community or collaboration platform. HumHubConsists of a core application that can be extended with additional modules and tuned to your needs with many configuration options.

HumHubWorth a try if you're looking for a solid, customizable social networking software

Install

environment variable

dockerEnvironment variables related to

variable default value describe
MYSQL_ROOT_PASSWORD none administrator password
MYSQL_DATABASE none database name
MYSQL_USER none database user
MYSQL_PASSWORD none database password

The above variables are all parameters related to database mirroring, and HumHubthe description of the official document has not been found.

docker cli install

If you are familiar with the command line, it may be docker clifaster to use

When installing below

  1. mriedmann/humhublatestThe version number corresponding to the version of the mirror image is 1.13.0; when this article was published, it was 1.13.2;
  2. Lao Su did not expose the database port;
# 新建文件夹 humhub 和 子目录
mkdir -p /volume2/docker/humhub/{
    
    config,data,modules,uploads/profile_image}

# 进入 humhub 目录
cd /volume2/docker/humhub

# 运行 MariaDB 容器
docker run -d \
   --restart unless-stopped \
   --name humhub_db \
   -v $(pwd)/data:/var/lib/mysql \
   -e "MYSQL_ROOT_PASSWORD=root" \
   -e "MYSQL_DATABASE=humhub" \
   -e "MYSQL_USER=humhub" \
   -e "MYSQL_PASSWORD=humhub" \
   mariadb:10.6

# 运行 humhub 容器
docker run -d \
   --restart unless-stopped \
   --name humhub-web \
   --link=humhub_db:db \
   -p 8140:80 \
   -v $(pwd)/config:/var/www/localhost/htdocs/protected/config \
   -v $(pwd)/uploads:/var/www/localhost/htdocs/uploads \
   -v $(pwd)/modules:/var/www/localhost/htdocs/protected/modules \
   mriedmann/humhub:latest

docker compose install

You can also use docker-composethe installation, save the following content as docker-compose.ymla file

version: '3.1'

services:
  humhub:
    image: mriedmann/humhub:latest
    container_name: humhub-web
    links:
      - "db:db"
    ports:
      - "8140:80"
    volumes:
      - ./config:/var/www/localhost/htdocs/protected/config
      - ./uploads:/var/www/localhost/htdocs/uploads
      - ./modules:/var/www/localhost/htdocs/protected/modules

  db:
    image: mariadb:10.6
    container_name: humhub-db
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: humhub
      MYSQL_USER: humhub
      MYSQL_PASSWORD: humhub

Then execute the following command

# 新建文件夹 humhub 和 子目录
mkdir -p /volume2/docker/humhub/{
    
    config,data,modules,uploads/profile_image}

# 进入 humhub 目录
cd /volume2/docker/humhub

# 将 docker-compose.yml 放入当前目录

# 一键启动
docker-compose up -d

run

Setup Wizard

Type in your browser http://群晖IP:8140to see the setup wizard. Simplified Chinese is supported by default

In the previous version, it may be reported uploads/profile_imagethat there is a directory permission problem in the directory, such as 权限 - Profile Image (Hint: Make /var/www/localhost/htdocs/uploads/profile_image writable for the Webserver/PHP!)this error; but 1.13.0it is normal on .

Next comes the database settings

  • Host name: because it is used --link=humhub_db:db, fill in the alias db;
  • Port: MariaDBThe default port is 3306;
  • Username: must be MYSQL_USERconsistent with ;
  • Password: must be MYSQL_PASSWORDconsistent with ;
  • Database name: must be MYSQL_DATABASEconsistent with ;

start initialization

Set platform name

For other configurations, Lao Su chose跳过这一步

set administrator

Lao Su chooses to keep the example, this is to get familiar with it faster

This is all set up

login run

You can register a new account, and Lao Su directly uses the administrator account to log in

After successful login

The software adopts a responsive design, so it can adapt to different screen sizes, and the effect on mobile phones is also good

reverse proxy

Suppose our actual access address is:https://humhub.laosu.ml:444

domain name LAN address Remark
humhub.laosu.ml http://192.168.0.197:8140 humhubaccess address

npmsettings in

SSLall ticked

HumHubAfter reverse generation, there is a phenomenon of port truncation, so Advancedthe following code needs to be added to

   location / {  
       proxy_set_header Host $host:444;  
       proxy_set_header X-Forwarded-For   $proxy_add_x_forwarded_for;  
       proxy_set_header X-Forwarded-Proto $scheme;
       proxy_set_header X-Forwarded-Protocol $scheme;
       proxy_pass  http://192.168.0.197:8140;  
       proxy_redirect http:// https://;  
   }

reference documents

humhub/humhub: HumHub is an Open Source Enterprise Social Network. Easy to install, intuitive to use and extendable with countless freely available modules.
地址:https://github.com/humhub/humhub

HumHub - The flexible Open Source Social Network Kit for Collaboration
地址:https://www.humhub.com/en

About HumHub | HumHub Documentation
address: https://docs.humhub.org/docs/about/humhub

mriedmann/humhub-docker: Alpine-based PHP-FPM and NGINX HumHub docker-container
地址:https://github.com/mriedmann/humhub-docker

Guess you like

Origin blog.csdn.net/wbsu2004/article/details/131673685