Giter VIP home page Giter VIP logo

humhub-docker's Introduction

Alpine-based PHP-FPM and NGINX HumHub docker-container

Codacy Badge Docker Image CI Docker Pulls

⚠️ Version Shift: We lately changed the versions of latest (1.8->1.9) / stable (1.7->1.8) / legacy (1.7). This can lead to an unexpected update when you are using these moving tags. If you do not want to upgrade, use the corresponding version-tags.

⚠️ Image Removal: We will purge all registries from End-Of-Life images soon. These images are not maintained anymore and contain major security flaws. To protect the public we will remove them. If you really want to use these images, you have to make a local copy.

HumHub is a feature rich and highly flexible OpenSource Social Network Kit written in PHP. This container provides a quick, flexible and lightweight way to set up a proof-of-concept for detailed evaluation. Using this in production is possible, but please note that there is currently no official support available for this kind of setup.

Versions

This project provides different images and tags for different purposes. For evaluation use humhub:stable, for production consider using the newest minor-version tag (e.g. humhub:1.6).

  • latest : unstable master build (not recommended for production; use with caution, might be unstable!)
  • Minor (e.g 1.6): Always points to the latest release of given minor version. (Recommended)
  • Build (e.g 1.6.3): Always points to the latest release of given build. Very stable but might be outdated.
  • stable: Always points to oldest, still supported, therefore most mature version. Updates include minor-version changes which can include db-schema changes (higher risk).
  • legacy: Try to avoid this tag as much as possible. If your current installation is flagged as "deprecated" the related tag is also changed to "legacy". Please try to upgrade as fast as possible to avoid security and other issues.

Variants

There are 3 different variants of this image. Use the unspecific tag (e.g. humhub:1.6) if you what a running installation as fast as possible. Use the moving tags if you want to stay up-to-date, not caring about version-upgrades. For critical environments we recommend that you stick to the version-tags or digest, not using moving tags.

If plan to build some kind of hosted solution, have a look at docker-compose.prod.yml to understand how the variant images can be used.

  • all-in-one (e.g. humhub:1.6): Multi-service image (nginx + php-fpm). Use this if you are not sure what you need.
  • nginx (e.g. humhub:1.6-nginx): Only static files and nginx proxy config without php.
  • phponly (e.g. humhub:1.6-phponly): HumHub sources bundled with php-fpm. Needs a fcgi application-server to be able to deliver http.

Matrix

  • EndOfLife (EOL) means that there are no more continuous rebuilds happening. These versions can get removed at any time, so please do not use them or upgrade immediately.
  • Versions flagged as Deprecated will enter EOL soon. Please avoid using them or upgrade as soon a possible.
  • Stable Versions are broadly used and are receiving most attention. Using them will most likely provide the best experience.
  • You can use Testing Versions if you need special new features. The newest HumHub versions will be first released in this way to find migration bugs in a save way. If you want to test upgrades to the next major version, this can be done with this tag.
  • Experimental is reserved for development of this project and always defines an early and potentially broken build. We are doing our best to avoid broken releases to latest, but please be warned and do not use this in production environments.
Version Status AllInOne Nginx PHP-Only
1.4 ⚠️ EndOfLife humhub:1.4 humhub:1.4 humhub:1.4
1.5 ⚠️ EndOfLife humhub:1.5 humhub:1.5 humhub:1.5
1.6 ⚠️ EndOfLife humhub:1.6 humhub:1.6 humhub:1.6
1.7 👎 Deprecated humhub:1.7 humhub:1.7 humhub:1.7
1.8 👍 Stable humhub:1.8 humhub:1.8 humhub:1.8
1.9 💥 Experimental humhub:1.9 humhub:1.9 humhub:1.9
Flavor Stable Latest Legacy
AllInOne humhub:stable humhub:latest humhub:legacy
Nginx humhub:stable humhub:latest-nginx humhub:legacy-nginx
PHP-Only humhub:stable humhub:latest-phponly humhub:legacy-phponly

Quickstart

No database integrated. For persistency look at the Compose-File example.

  1. docker run -d --name humhub_db -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=humhub mariadb:10.2
  2. docker run -d --name humhub -p 80:80 --link humhub_db:db mriedmann/humhub:stable
  3. open http://localhost/ in browser
  4. complete the installation wizard (use db as database hostname and humhub as database name)
  5. finished

Composer File Example

version: '3.1'
services:
  humhub:
    image: mriedmann/humhub:1.6.2
    links:
      - "db:db"
    ports:
      - "8080:80"
    volumes:
      - "config:/var/www/localhost/htdocs/protected/config"
      - "uploads:/var/www/localhost/htdocs/uploads"
      - "modules:/var/www/localhost/htdocs/protected/modules"
    environment:
      HUMHUB_DB_USER: humhub
      HUMHUB_DB_PASSWORD: humhub

  db:
    image: mariadb:10.2
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: humhub
      MYSQL_USER: humhub
      MYSQL_PASSWORD: humhub

volumes:
  config: {}
  uploads: {}
  modules: {}

In some situations (e.g. with podman-compose) you have to run compose up twice to give it some time to create the named volumes.

Advanced Config

This container supports some further options which can be configured via environment variables. Look at the docker-compose.yml for some inspiration.

Database Config

To avoid the visual installer at the first startup, set the HUMHUB_DB_PASSWORD and HUMHUB_DB_USER. If you use the --link argument please specify the name of the link as host (via HUMHUB_DB_HOST) or use db as linkname ( --link <container>:db ).

HUMHUB_DB_USER     []
HUMHUB_DB_PASSWORD []
HUMHUB_DB_NAME     [humhub]
HUMHUB_DB_HOST     [db]

Autoinstall Config

HUMHUB_AUTO_INSTALL [false]

If this and HUMHUB_DB_USER are set an automated installation will run during the first startup. This feature utilities a hidden installer-feature used for integration testing ( see code file ).

HUMHUB_PROTO [http]
HUMHUB_HOST  [localhost]

If these are defined during auto-installation, HumHub will be installed and configured to use urls with those details. (i.e. If they are set as HUMHUB_PROTO=https, HUMHUB_HOST=example.com, HumHub will be installed and configured so that the base url is https://example.com/. Leaving these as default will result in HumHub being installed and configured to be at http://localhost/.

HUMHUB_ADMIN_LOGIN    [admin]
HUMHUB_ADMIN_EMAIL    [[email protected]]
HUMHUB_ADMIN_PASSWORD [test]

If these are defined during auto-installation, HumHub admin will be created with those credentials.

Startup Config

INTEGRITY_CHECK [1]

This can be set to "false" to disable the startup integrity check. Use with caution!

WAIT_FOR_DB [1]

Can be used to let the startup fail if the db host is unavailable. To disable this, set it to "false". Can be useful if an external db-host is used, avoid when using a linked container.

SET_PJAX [1]

PJAX is a jQuery plugin that uses AJAX and pushState to deliver a fast browsing experience with real permalinks, page titles, and a working back button. (ref) This library is known to cause problems with some browsers during installation. This container starts with PJAX disabled to improve the installation reliability. If this is set (default), PJAX is enabled during the second startup. Set this to "false" to permanently disable PJAX. Please note that changing this after container-creation has no effect on this behavior.

Mailer Config

It is possible to configure HumHub email settings using the following environment variables:

HUMHUB_MAILER_SYSTEM_EMAIL_ADDRESS    [[email protected]]
HUMHUB_MAILER_SYSTEM_EMAIL_NAME       [HumHub]
HUMHUB_MAILER_TRANSPORT_TYPE          [php]
HUMHUB_MAILER_HOSTNAME                []
HUMHUB_MAILER_PORT                    []
HUMHUB_MAILER_USERNAME                []
HUMHUB_MAILER_PASSWORD                []
HUMHUB_MAILER_ENCRYPTION              []
HUMHUB_MAILER_ALLOW_SELF_SIGNED_CERTS []

LDAP Config

It is possible to configure HumHub LDAP authentication settings using the following environment variables:

HUMHUB_LDAP_ENABLED                               [0]
HUMHUB_LDAP_HOSTNAME                              []
HUMHUB_LDAP_PORT                                  []
HUMHUB_LDAP_ENCRYPTION                            []
HUMHUB_LDAP_USERNAME                              []
HUMHUB_LDAP_PASSWORD                              []
HUMHUB_LDAP_BASE_DN                               []
HUMHUB_LDAP_LOGIN_FILTER                          []
HUMHUB_LDAP_USER_FILTER                           []
HUMHUB_LDAP_USERNAME_ATTRIBUTE                    []
HUMHUB_LDAP_EMAIL_ATTRIBUTE                       []
HUMHUB_LDAP_ID_ATTRIBUTE                          []
HUMHUB_LDAP_REFRESH_USERS                         []
HUMHUB_ADVANCED_LDAP_THUMBNAIL_SYNC_PROPERTY      [thumbnailphoto]

PHP Config

It is also possible to change some php-config-settings. This comes in handy if you have to scale this container vertically.

Following environment variables can be used (default values in angle brackets):

PHP_POST_MAX_SIZE       [16M]
PHP_UPLOAD_MAX_FILESIZE [10M]
PHP_MAX_EXECUTION_TIME  [60]
PHP_MEMORY_LIMIT        [1G]
PHP_TIMEZONE            [UTC]

NGINX Config

Following variables can be used to configure the embedded Nginx. The config-file gets rewritten on every container startup and is not persisted. Avoid changing it by hand.

NGINX_CLIENT_MAX_BODY_SIZE [10m]
NGINX_KEEPALIVE_TIMEOUT    [65]
HUMHUB_REVERSEPROXY_WHITELIST ["127.0.0.1"]

HUMHUB_REVERSEPROXY_WHITELIST allows access to the /ping endpoint for the given IP-Address. CIDR notation is supported.

Contribution

Please use the issues-page for bugs or suggestions. Pull-requests are highly welcomed.

Special Thanks

Special thanks go to following contributors for there incredible work on this image:

  • @madmath03
  • @ArchBlood
  • @pascalberger
  • @bkmeneguello

And also to @luke- and his team for providing, building and maintaining HumHub.

humhub-docker's People

Contributors

actions-user avatar alea81 avatar bkmeneguello avatar bwalti avatar clasko avatar codacy-badger avatar dependabot-preview[bot] avatar dependabot[bot] avatar felli avatar jusdino avatar jvies avatar madmath03 avatar mirfire avatar mriedmann avatar olekristensen avatar pandeybk avatar pascalberger avatar pferraris avatar r4nc0r avatar stffabi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.