Skip to content

Commit

Permalink
Use Github Actions to build and release the images
Browse files Browse the repository at this point in the history
For now, images are only build on manual trigger.
  • Loading branch information
splitbrain committed Apr 11, 2024
1 parent 4f6b3aa commit 3cb4982
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 10 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and Publish Docker Images
on:
workflow_dispatch:

jobs:
buildmatrix:
name: Create Build Matrix
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: Set up matrix
id: set-matrix
run: |
echo "matrix=$(curl https://download.dokuwiki.org/version | jq -c 'del(.master) | {release: [.[]]}')" >> $GITHUB_OUTPUT
build:
needs: buildmatrix
name: Build Docker Image ${{ matrix.release.date }}
runs-on: ubuntu-latest
strategy:
matrix: ${{fromJson(needs.buildmatrix.outputs.matrix)}}
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v3
with:
username: splitbrain
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
platforms: linux/amd64,linux/arm64
push: true
cache-from: type=gha, scope=${{ github.workflow }}
cache-to: type=gha, scope=${{ github.workflow }}
tags: |
dokuwiki/dokuwiki:${{ matrix.release.date }}
dokuwiki/dokuwiki:${{ matrix.release.type }}
${{ matrix.release.type == 'stable' && 'dokuwiki/dokuwiki:latest' || '' }}
build-args: |
DOKUWIKI_VERSION=${{ matrix.release.date }}
29 changes: 19 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,22 @@ installation. It is meant to be used with a reverse proxy that handles SSL termi
not worth it to use this image for a standalone installation (
read [Running DokuWiki on Docker](https://www.patreon.com/posts/42961375) for alternatives).

## Usage
## Quick Start:

See docker-compose.yml for an example setup.
docker run -p 8080:8080 --user 1000:1000 -v /path/to/storage:/storage dokuwiki/dokuwiki:stable

* Exposed Port: 8080
* Volume: /storage
* Can be run as non-root user. Be sure the storage volume is writable by the given uid.
* Exposed Port: `8080`
* Volume: `/storage`
* Can be run as non-root user. Be sure the storage volume is writable by the given uid.
* Available tags: `stable`, `oldstable` and versions like `2020-07-29a`. `latest` is an alias for `stable`.

On first run, use DokuWiki's installer to configure the wiki as usual.
On first run, use DokuWiki's [installer](https://www.dokuwiki.org/installer) to configure the wiki as usual.

## Features

* xsendfile configured and enabled
* imagemagick installed and enabled
* nice URLs via rewriting configured and enabled
* xsendfile configured and enabled
* imagemagick installed and enabled
* nice URLs via rewriting configured and enabled

## PHP Configuration & Environment

Expand All @@ -34,7 +35,7 @@ Custom PHP configuration values can be set in a `php.ini` file in the storage vo
## How this image handles user data

Besides the obvious page and media data, extensions and configuration need to be persisted over container replacements.
However it needs to be differentiated between user installed extensions and configuration and bundled extensions and
However, it needs to be differentiated between user installed extensions and configuration and bundled extensions and
configuration.

This image uses a single storage volume for all user data.
Expand All @@ -50,3 +51,11 @@ Required symlinks are rechecked on every container restart.

This setup ensures that all adjustments you may make via the Admin interface will be stored correctly in the storage
volume while all bundled data is kept in the container and is correctly updated/replaced when the container is updated.

# Development

To manually build the image:

docker build -t dokuwiki/dokuwiki:stable .

Builds and deployments are currently only done manually by triggering the GitHub Actions workflow.

0 comments on commit 3cb4982

Please sign in to comment.