Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/docker/library/alpine-3.19.0
Browse files Browse the repository at this point in the history
  • Loading branch information
mriedmann authored Aug 6, 2024
2 parents b66e323 + 87bd180 commit c1c68f7
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 21 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,17 @@ jobs:
- name: replace image
run: sed -i "s/docker.io\/mriedmann\/humhub:latest/ghcr.io\/${GITHUB_REPOSITORY_OWNER}\/humhub:${GITHUB_REF_NAME_SLUG}-${HUMHUB_VERSION}-allinone/g" docker-compose.yml
- name: Spin up services
run: docker-compose -f docker-compose.yml up -d
run: docker compose -f docker-compose.yml up -d
- name: Wait
run: sleep 60
- name: Check status
run: docker ps -a
- name: Logs
run: docker-compose logs
run: docker compose logs
- name: Test
run: curl http://localhost:8080/ -L --fail && curl http://localhost:8080/ -L --fail -s | grep 'Sign in</button>' -q
- name: Test Email
run: docker-compose exec -T humhub php /var/www/localhost/htdocs/protected/yii test/email '[email protected]' | grep 'Message successfully sent!' -q
run: docker compose exec -T humhub php /var/www/localhost/htdocs/protected/yii test/email '[email protected]' | grep 'Message successfully sent!' -q
test_prod:
needs: build_variants
runs-on: ubuntu-latest
Expand Down Expand Up @@ -138,17 +138,17 @@ jobs:
sed -i "s/docker.io\/mriedmann\/humhub:stable-nginx/ghcr.io\/${GITHUB_REPOSITORY_OWNER}\/humhub:${GITHUB_REF_NAME_SLUG}-${HUMHUB_VERSION}-nginx/g" docker-compose.prod.yml
sed -i "s/docker.io\/mriedmann\/humhub:stable-phponly/ghcr.io\/${GITHUB_REPOSITORY_OWNER}\/humhub:${GITHUB_REF_NAME_SLUG}-${HUMHUB_VERSION}-phponly/g" docker-compose.prod.yml
- name: Spin up services
run: docker-compose -f docker-compose.prod.yml up -d
run: docker compose -f docker-compose.prod.yml up -d
- name: Wait
run: sleep 60
- name: Check status
run: docker ps -a
- name: Logs
run: docker-compose logs
run: docker compose logs
- name: Test
run: curl http://localhost:8080/ -L --fail && curl http://localhost:8080/ -L --fail -s | grep 'Sign in</button>' -q
- name: Test Email
run: docker-compose exec -T humhub php /var/www/localhost/htdocs/protected/yii test/email '[email protected]' | grep 'Message successfully sent!' -q
run: docker compose exec -T humhub php /var/www/localhost/htdocs/protected/yii test/email '[email protected]' | grep 'Message successfully sent!' -q
push_ghcr:
needs: ["test_aio", "test_prod"]
runs-on: ubuntu-latest
Expand Down
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ ARG RUNTIME_DEPS="\
libintl \
php82 \
php82-apcu \
php82-bcmath \
php82-ctype \
php82-curl \
php82-dom \
php82-exif \
php82-fileinfo \
php82-fpm \
php82-gd \
php82-gmp \
php82-iconv \
php82-intl \
php82-json \
Expand Down Expand Up @@ -138,7 +140,7 @@ RUN chmod +x /usr/local/bin/php-fpm-healthcheck \

EXPOSE 9000

FROM docker.io/library/nginx:1.25.3-alpine as humhub_nginx
FROM docker.io/library/nginx:1.27.0-alpine as humhub_nginx

LABEL variant="nginx"

Expand Down
26 changes: 16 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,23 @@ Using this in production is possible, but please note that there is currently no

## 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.13`).
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.15`).

- `latest` : unstable master build (not recommended for production; use with caution, might be unstable!)
- Minor (e.g `1.13`): Always points to the latest release of given minor version. (Recommended)
- Build (e.g `1.13.4`): Always points to the latest release of given build. Very stable but might be outdated.
- Minor (e.g `1.15`): Always points to the latest release of given minor version. (Recommended)
- Build (e.g `1.15.4`): 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.13`) 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.
There are 3 different variants of this image. Use the unspecific tag (e.g. `humhub:1.15`) 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.13`): Multi-service image (nginx + php-fpm). Use this if you are not sure what you need.
- **nginx** (e.g. `humhub:1.13-nginx`): Only static files and nginx proxy config without php.
- **phponly** (e.g. `humhub:1.13-phponly`): HumHub sources bundled with php-fpm. Needs a fcgi application-server to be able to deliver http.
- **all-in-one** (e.g. `humhub:1.15`): Multi-service image (nginx + php-fpm). Use this if you are not sure what you need.
- **nginx** (e.g. `humhub:1.15-nginx`): Only static files and nginx proxy config without php.
- **phponly** (e.g. `humhub:1.15-phponly`): HumHub sources bundled with php-fpm. Needs a fcgi application-server to be able to deliver http.

### Matrix

Expand All @@ -36,9 +36,9 @@ If plan to build some kind of hosted solution, have a look at `docker-compose.pr

| Version | Status | AllInOne | Nginx | PHP-Only |
| ------- | ----------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `1.12` | :thumbsdown: Deprecated | [![humhub:1.12](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.12-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.12](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.12--nginx-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.12](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.12--phponly-blue)](https://hub.docker.com/r/mriedmann/humhub) |
| `1.13` | :thumbsup: Stable | [![humhub:1.13](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.13-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.13](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.13--nginx-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.13](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.13--phponly-blue)](https://hub.docker.com/r/mriedmann/humhub) |
| `1.14` | :boom: Experimental | [![humhub:1.14](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.14-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.14](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.14--nginx-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.14](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.14--phponly-blue)](https://hub.docker.com/r/mriedmann/humhub) |
| `1.13` | :thumbsdown: Deprecated | [![humhub:1.13](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.13-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.13](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.13--nginx-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.13](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.13--phponly-blue)](https://hub.docker.com/r/mriedmann/humhub) |
| `1.15` | :thumbsup: Stable | [![humhub:1.15](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.15-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.15](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.15--nginx-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.15](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.15--phponly-blue)](https://hub.docker.com/r/mriedmann/humhub) |
| `1.16` | :boom: Experimental | [![humhub:1.16](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.16-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.16](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.16--nginx-blue)](https://hub.docker.com/r/mriedmann/humhub) | [![humhub:1.16](https://img.shields.io/badge/image-mriedmann%2Fhumhub%3A1.16--phponly-blue)](https://hub.docker.com/r/mriedmann/humhub) |

| Flavor | Stable | Latest | Legacy |
| -------- | ------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
Expand Down Expand Up @@ -71,6 +71,9 @@ services:
- "config:/var/www/localhost/htdocs/protected/config"
- "uploads:/var/www/localhost/htdocs/uploads"
- "modules:/var/www/localhost/htdocs/protected/modules"
- "logs:/var/www/localhost/htdocs/protected/runtime/logs"
- "searchdb:/var/www/localhost/htdocs/protected/runtime/searchdb"
- "themes:/var/www/localhost/htdocs/themes"
environment:
HUMHUB_DB_USER: humhub
HUMHUB_DB_PASSWORD: humhub
Expand All @@ -87,6 +90,9 @@ volumes:
config: {}
uploads: {}
modules: {}
logs: {}
searchdb: {}
themes: {}
```

> In some situations (e.g. with [podman-compose](https://github.com/containers/podman-compose)) you have to run compose `up` twice to give it some time to create the named volumes.
Expand Down
1 change: 1 addition & 0 deletions base/etc/supervisord.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ nodaemon=true
loglevel=warn
pidfile=/var/run/supervisord.pid
logfile=/proc/self/fd/2
logfile_maxbytes=0
stdout_logfile=/proc/self/fd/2
stdout_logfile_maxbytes=0

Expand Down
1 change: 0 additions & 1 deletion docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ if [ -f "/var/www/localhost/htdocs/protected/config/dynamic.php" ]; then
if [ "$INSTALL_VERSION" != "$SOURCE_VERSION" ]; then
echo >&3 "$0: Updating from version $INSTALL_VERSION to $SOURCE_VERSION"
php yii migrate/up --includeModuleMigrations=1 --interactive=0
php yii search/rebuild
cp -v /usr/src/humhub/.version /var/www/localhost/htdocs/protected/config/.version
fi
else
Expand Down
6 changes: 3 additions & 3 deletions versions.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
1.15.0 1.15 latest
1.14.5 1.14 stable
1.13.2 1.13 legacy
1.16.1 1.16 latest
1.15.6 1.15 stable
1.14.5 1.14 legacy

0 comments on commit c1c68f7

Please sign in to comment.