Compare commits
4 Commits
8eba3fe655
...
v3.3.14
| Author | SHA1 | Date | |
|---|---|---|---|
|
04363efd07
|
|||
|
550d1aad08
|
|||
|
c3d519bd39
|
|||
|
52df42d173
|
@@ -1,3 +1,4 @@
|
|||||||
.secrets
|
.secrets
|
||||||
.act
|
.act
|
||||||
examples
|
examples
|
||||||
|
.env
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ when:
|
|||||||
event: [push, pull_request, tag]
|
event: [push, pull_request, tag]
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
- &repo source.hodakov.me/${CI_REPO_OWNER}/docker-phpbb
|
- &repo source.hodakov.me/${CI_REPO_OWNER}/phpbb
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
dryrun:
|
dryrun:
|
||||||
|
|||||||
10
Dockerfile
10
Dockerfile
@@ -71,7 +71,7 @@ COPY phpbb/config.php /phpbb/www
|
|||||||
|
|
||||||
# Expose the ports Caddy is reachable on
|
# Expose the ports Caddy is reachable on
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
EXPOSE 8181
|
EXPOSE 9080
|
||||||
|
|
||||||
WORKDIR /phpbb/www
|
WORKDIR /phpbb/www
|
||||||
|
|
||||||
@@ -88,8 +88,14 @@ ENV PHPBB_INSTALL= \
|
|||||||
PHPBB_DEBUG= \
|
PHPBB_DEBUG= \
|
||||||
PHPBB_DEBUG_CONTAINER=
|
PHPBB_DEBUG_CONTAINER=
|
||||||
|
|
||||||
|
# Add sane default volumes for phpBB
|
||||||
|
VOLUME /phpbb/sqlite
|
||||||
|
VOLUME /phpbb/www/files
|
||||||
|
VOLUME /phpbb/www/store
|
||||||
|
VOLUME /phpbb/www/images/avatars/upload
|
||||||
|
|
||||||
COPY start.sh /usr/local/bin/
|
COPY start.sh /usr/local/bin/
|
||||||
CMD ["start.sh"]
|
CMD ["start.sh"]
|
||||||
|
|
||||||
# Configure a healthcheck to validate that everything is up and running
|
# Configure a healthcheck to validate that everything is up and running
|
||||||
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
|
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:9080/fpm-ping
|
||||||
|
|||||||
63
README.md
63
README.md
@@ -2,18 +2,16 @@
|
|||||||
|
|
||||||
[](https://ci.hodakov.me/repos/1)
|
[](https://ci.hodakov.me/repos/1)
|
||||||
|
|
||||||
This is updated fork of [selim13's docker-phpbb image](https://github.com/selim13/docker-phpbb).
|
|
||||||
|
|
||||||
Now it even bundles caddy instead of apache2. Thanks
|
|
||||||
[ParaParty/docker-php-caddy](https://github.com/ParaParty/docker-php-caddy) for the inspiration.
|
|
||||||
|
|
||||||
Lightweight, Alpine based [phpBB](https://www.phpbb.com/) docker image.
|
Lightweight, Alpine based [phpBB](https://www.phpbb.com/) docker image.
|
||||||
|
|
||||||
|
This is a heavily modified fork of [selim13's docker-phpbb image](https://github.com/selim13/docker-phpbb). Now it even bundles caddy instead of apache2. Thanks
|
||||||
|
[ParaParty/docker-php-caddy](https://github.com/ParaParty/docker-php-caddy) for the inspiration.
|
||||||
|
|
||||||
You can find an example of forum running using this image at [ks.fhs.sh](https://ks.fhs.sh).
|
You can find an example of forum running using this image at [ks.fhs.sh](https://ks.fhs.sh).
|
||||||
|
|
||||||
# Supported tags and respective `Dockerfile` links
|
# Supported tags and respective `Dockerfile` links
|
||||||
|
|
||||||
- [`3.3`, `3.3.11`, `latest`](https://github.com/fat0troll/docker-phpbb/blob/master/Dockerfile) bundled with PHP 8
|
- [`3`,`3.3`, `3.3.14`, `latest`](https://source.hodakov.me/hdkv/docker-phpbb/src/branch/main/Dockerfile) bundled with PHP 8
|
||||||
|
|
||||||
# How to use this image
|
# How to use this image
|
||||||
|
|
||||||
@@ -24,10 +22,10 @@ installer script, just run a temporary container with `PHPBB_INSTALL=true`
|
|||||||
environment variable:
|
environment variable:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run -p 8000:8181 --name phpbb-install -e PHPBB_INSTALL=true -d fat0troll/phpbb:3.3
|
$ docker run -p 8080:8080 --name phpbb-install -e PHPBB_INSTALL=true -d source.hodakov.me/hdkv/phpbb
|
||||||
```
|
```
|
||||||
|
|
||||||
Point your browser to the http://localhost:8000 to begin the
|
Point your browser to the http://localhost:8080 to begin the
|
||||||
installation process.
|
installation process.
|
||||||
|
|
||||||
This image is bundled with SQLite3, MySQL and PostgresSQL database engines
|
This image is bundled with SQLite3, MySQL and PostgresSQL database engines
|
||||||
@@ -50,7 +48,7 @@ $ docker stop phpbb-install
|
|||||||
You can start a container as follows:
|
You can start a container as follows:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run --name phpbb -d fat0troll/phpbb:3.3
|
$ docker run --name phpbb -d source.hodakov.me/hdkv/phpbb
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, it uses SQLite3 as a database backend, so you will need to supply
|
By default, it uses SQLite3 as a database backend, so you will need to supply
|
||||||
@@ -59,7 +57,7 @@ it with a database file. It's default path is `/phpbb/sqlite/sqlite.db`.
|
|||||||
You can import it from the temporary installation container above:
|
You can import it from the temporary installation container above:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run --volumes-from phpbb-install --name phpbb -d fat0troll/phpbb:3.3
|
$ docker run --volumes-from phpbb-install --name phpbb -d source.hodakov.me/hdkv/phpbb
|
||||||
```
|
```
|
||||||
|
|
||||||
Or just copy it inside container if you have one from previous phpBB
|
Or just copy it inside container if you have one from previous phpBB
|
||||||
@@ -79,7 +77,7 @@ $ docker run --name phpbb \
|
|||||||
-e PHPBB_DB_PORT=3306 \
|
-e PHPBB_DB_PORT=3306 \
|
||||||
-e PHPBB_DB_NAME=phpbb \
|
-e PHPBB_DB_NAME=phpbb \
|
||||||
-e PHPBB_DB_USER=phpbb \
|
-e PHPBB_DB_USER=phpbb \
|
||||||
-e PHPBB_DB_PASSWD=pass -d selim13/phpbb:3.3
|
-e PHPBB_DB_PASSWD=pass -d source.hodakov.me/hdkv/phpbb
|
||||||
```
|
```
|
||||||
|
|
||||||
## Environment variables
|
## Environment variables
|
||||||
@@ -174,41 +172,8 @@ If set to `true`, enables phpBB debug mode.
|
|||||||
|
|
||||||
## Volumes
|
## Volumes
|
||||||
|
|
||||||
By default there are four volumes created for each container:
|
No default volumes are predefined. You can mount everything you want
|
||||||
|
inside `/phpbb/<something>`. For example, given that [ks.fhs.sh](https://ks.fhs.sh)
|
||||||
- /phpbb/sqlite
|
was migrating into Docker from bare metal instance back in 2023, I
|
||||||
- /phpbb/www/files
|
mounted the directories `files`, `store`, `ext`, `images` and
|
||||||
- /phpbb/www/store
|
`themes`, which proved working for more than a year at this point.
|
||||||
- /phpbb/www/images/avatars/upload
|
|
||||||
|
|
||||||
# Additional configuration
|
|
||||||
|
|
||||||
This image is based on a stock official Alpine image with apache2 and php5
|
|
||||||
packages from the Alpine Linux repository, so you can drop their custom
|
|
||||||
configuration files to `/etc/apache2/conf.d` and `/etc/php5/conf.d`.
|
|
||||||
|
|
||||||
## Pass user's IP from proxy
|
|
||||||
|
|
||||||
If you are planning to start a container behind proxy
|
|
||||||
(like [nginx-proxy](https://github.com/jwilder/nginx-proxy)), it will probably
|
|
||||||
be a good idea to get user's real IP instead of proxy one. For this, you can use
|
|
||||||
Apache RemoteIP module. Create a configuration file:
|
|
||||||
|
|
||||||
```apache
|
|
||||||
LoadModule remoteip_module modules/mod_remoteip.so
|
|
||||||
|
|
||||||
RemoteIPHeader X-Real-IP
|
|
||||||
RemoteIPInternalProxy nginx-proxy
|
|
||||||
```
|
|
||||||
|
|
||||||
Here `X-Real-IP` is a header name, where proxy passed user's real IP and
|
|
||||||
`nginx-proxy` is proxy host name.
|
|
||||||
|
|
||||||
Then push it to `/etc/apache2/conf.d/` directory, for example, by extending this
|
|
||||||
image:
|
|
||||||
|
|
||||||
```dockerfile
|
|
||||||
FROM selim13/phpbb:3.3
|
|
||||||
|
|
||||||
COPY remoteip.conf /etc/apache2/conf.d
|
|
||||||
```
|
|
||||||
|
|||||||
@@ -1,16 +1,11 @@
|
|||||||
|
{
|
||||||
|
servers {
|
||||||
|
trusted_proxies static private_ranges
|
||||||
|
trusted_proxies_strict
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
:8080 {
|
:8080 {
|
||||||
root * /var/www/html/public
|
|
||||||
|
|
||||||
php_fastcgi unix//run/php-fpm.sock {
|
|
||||||
trusted_proxies private_ranges
|
|
||||||
}
|
|
||||||
|
|
||||||
file_server
|
|
||||||
|
|
||||||
log stdout
|
|
||||||
}
|
|
||||||
|
|
||||||
:8181 {
|
|
||||||
root * /phpbb/www
|
root * /phpbb/www
|
||||||
|
|
||||||
php_fastcgi unix//run/php-fpm.sock {
|
php_fastcgi unix//run/php-fpm.sock {
|
||||||
@@ -21,3 +16,15 @@
|
|||||||
|
|
||||||
log stdout
|
log stdout
|
||||||
}
|
}
|
||||||
|
|
||||||
|
:9080 {
|
||||||
|
root * /var/www/html/public
|
||||||
|
|
||||||
|
php_fastcgi unix//run/php-fpm.sock {
|
||||||
|
trusted_proxies private_ranges
|
||||||
|
}
|
||||||
|
|
||||||
|
file_server
|
||||||
|
|
||||||
|
log stdout
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user