diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..bc9c11f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,13 @@ +name: Docker Build + +on: + push: + schedule: + - cron: '15 3 * * 0' + workflow_dispatch: + +jobs: + build: + uses: fab-infra/actions/.github/workflows/docker-build.yml@master + with: + docker-image: jedi-comport diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..44ccee4 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,16 @@ +# phpBB 3.3 base image +FROM ghcr.io/fab-infra/phpbb:3.3-opensuse15 + +# Download and extract extensions +RUN for PHPBB_EXT in 184661 204724 206731; do \ + curl -sSLf -o "/tmp/phbb_ext.zip" "https://www.phpbb.com/customise/db/download/${PHPBB_EXT}" &&\ + unzip "/tmp/phbb_ext.zip" -d ext &&\ + rm -f "/tmp/phbb_ext.zip"; \ + done &&\ + chown -R wwwrun:www ext + +# Environment +ENV PHPBB_EXTENSIONS="phpbb/boardannouncements,alfredoramos/seometadata,alfredoramos/simplespoiler" + +# Files +COPY --chown=wwwrun:www ./styles styles diff --git a/README.md b/README.md index 55fe339..122c3a1 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ docker compose up -d Then, point your browser to http://comport.dev.jediholo.net and you should see the JEDI Comport forum. -Login as admin/admin, then go to the ACP: +Login as admin/admin123, then go to the ACP: - In Customize > Install Styles, install the `jediholo` style. - In General > Board settings, set `jediholo` as the Default and Guest style. diff --git a/docker-compose.yml b/docker-compose.yml index 480a871..fd6ae4d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,15 +1,19 @@ services: phpbb: - image: bitnami/phpbb:3.3.12 + image: ghcr.io/jediholo/jedi-comport:master + restart: on-failure + build: + context: . ports: - '127.0.0.12:80:8080' volumes: - - 'phpbb:/bitnami/phpbb' - - './setup.sh:/docker-entrypoint-init.d/setup.sh' - - './styles/jediholo:/phpbb/styles/jediholo' + - 'phpbb-files:/srv/www/apps/phpbb/files' + - 'phpbb-images:/srv/www/apps/phpbb/images' + - 'phpbb-store:/srv/www/apps/phpbb/store' + - './styles/jediholo:/srv/www/apps/phpbb/styles/jediholo' environment: - PHPBB_USERNAME=admin - - PHPBB_PASSWORD=admin + - PHPBB_PASSWORD=admin123 - PHPBB_FORUM_NAME=JEDI Comport - PHPBB_FORUM_DESCRIPTION=The JEDI HoloNet Communications Port - PHPBB_EMAIL=admin@jediholo.net @@ -19,6 +23,7 @@ services: - PHPBB_DATABASE_NAME=jedi-comport mysql: image: mariadb:10.11 + restart: on-failure ports: - '127.0.0.12:3306:3306' volumes: @@ -30,4 +35,6 @@ services: - MYSQL_DATABASE=jedi-comport volumes: mysql: - phpbb: + phpbb-files: + phpbb-images: + phpbb-store: diff --git a/setup.sh b/setup.sh deleted file mode 100644 index 7aba4f8..0000000 --- a/setup.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -ln -s /phpbb/styles/jediholo /bitnami/phpbb/styles/jediholo