mirror of
https://github.com/bitnami/containers.git
synced 2026-03-10 15:09:17 +08:00
3.2.0-r6 release
Removes VOLUME instruction from the Dockerfile
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
[](https://circleci.com/gh/bitnami/bitnami-docker-phpbb/tree/master)
|
||||
[](http://slack.oss.bitnami.com)
|
||||
[](http://slack.oss.bitnami.com)
|
||||
[](https://raw.githubusercontent.com/bitnami/bitnami-docker-phpbb/master/kubernetes.yml)
|
||||
|
||||
# What is phpBB?
|
||||
|
||||
> If you need to build a community forum, try phpBB. First released in 2000, phpBB is a bulletin board solution that allows you to create forums and subforums. phpBB supports the notion of users and groups, file attachments, full-text search, notifications and more. Hundreds of modifications are available including themes, communications add-ons, spam management and more.
|
||||
@@ -12,15 +13,15 @@ https://www.phpbb.com/
|
||||
## Docker Compose
|
||||
|
||||
```bash
|
||||
$ curl -LO https://raw.githubusercontent.com/bitnami/bitnami-docker-phpbb/master/docker-compose.yml
|
||||
$ docker-compose up
|
||||
$ curl -sSL https://raw.githubusercontent.com/bitnami/bitnami-docker-phpbb/master/docker-compose.yml > docker-compose.yml
|
||||
$ docker-compose up -d
|
||||
```
|
||||
|
||||
## Kubernetes
|
||||
|
||||
> **WARNING**: This is a beta configuration, currently unsupported.
|
||||
|
||||
Get the raw URL pointing to the kubernetes.yml manifest and use kubectl to create the resources on your Kubernetes cluster like so:
|
||||
Get the raw URL pointing to the `kubernetes.yml` manifest and use `kubectl` to create the resources on your Kubernetes cluster like so:
|
||||
|
||||
```bash
|
||||
$ kubectl create -f https://raw.githubusercontent.com/bitnami/bitnami-docker-phpbb/master/kubernetes.yml
|
||||
@@ -57,16 +58,14 @@ services:
|
||||
environment:
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
volumes:
|
||||
- 'mariadb_data:/bitnami/mariadb'
|
||||
- 'mariadb_data:/bitnami'
|
||||
phpbb:
|
||||
image: 'bitnami/phpbb:latest'
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
volumes:
|
||||
- 'phpbb_data:/bitnami/phpbb'
|
||||
- 'apache_data:/bitnami/apache'
|
||||
- 'php_data:/bitnami/php'
|
||||
- 'phpbb_data:/bitnami'
|
||||
depends_on:
|
||||
- mariadb
|
||||
|
||||
@@ -75,10 +74,6 @@ volumes:
|
||||
driver: local
|
||||
phpbb_data:
|
||||
driver: local
|
||||
apache_data:
|
||||
driver: local
|
||||
php_data:
|
||||
driver: local
|
||||
```
|
||||
|
||||
### Run the application manually
|
||||
@@ -109,17 +104,18 @@ Then you can access your application at http://your-ip/
|
||||
|
||||
## Persisting your application
|
||||
|
||||
If you remove every container and volume all your data will be lost, and the next time you run the image the application will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.
|
||||
If you remove the container all your data and configurations will be lost, and the next time you run the image the database will be reinitialized. To avoid this loss of data, you should mount a volume that will persist even after the container is removed.
|
||||
|
||||
For persistence of the phpBB deployment, the above examples define docker volumes namely `mariadb_data`, `phpbb_data`, `apache_data` and `php_data`. The phpBB application state will persist as long as these volumes are not removed.
|
||||
For persistence you should mount a volume at the `/bitnami` path. Additionally you should mount a volume for [persistence of the MariaDB data](https://github.com/bitnami/bitnami-docker-mariadb#persisting-your-database).
|
||||
|
||||
The above examples define docker volumes namely `mariadb_data` and `phpbb_data`. The phpBB application state will persist as long as these volumes are not removed.
|
||||
|
||||
To avoid inadvertent removal of these volumes you can [mount host directories as data volumes](https://docs.docker.com/engine/tutorials/dockervolumes/). Alternatively you can make use of volume plugins to host the volume data.
|
||||
|
||||
> **Note!** If you have already started using your application, follow the steps on [backing](#backing-up-your-application) up to pull the data from your running container down to your host.
|
||||
|
||||
### Mount host directories as data volumes with Docker Compose
|
||||
|
||||
This requires a minor change to the `docker-compose.yml` template previously shown:
|
||||
|
||||
```yaml
|
||||
version: '2'
|
||||
|
||||
@@ -129,7 +125,7 @@ services:
|
||||
environment:
|
||||
- ALLOW_EMPTY_PASSWORD=yes
|
||||
volumes:
|
||||
- '/path/to/your/local/mariadb_data:/bitnami/mariadb'
|
||||
- '/path/to/your/local/mariadb_data:/bitnami'
|
||||
phpbb:
|
||||
image: 'bitnami/phpbb:latest'
|
||||
depends_on:
|
||||
@@ -138,9 +134,7 @@ services:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
volumes:
|
||||
- '/path/to/phpbb-persistence:/bitnami/phpbb'
|
||||
- '/path/to/your/local/apache-persistence:/bitnami/apache'
|
||||
- '/path/to/your/local/php-persistence:/bitnami/php'
|
||||
- '/path/to/phpbb-persistence:/bitnami'
|
||||
```
|
||||
|
||||
### Mount host directories as data volumes using the Docker command line
|
||||
@@ -158,7 +152,7 @@ In this case you need to specify the directories to mount on the run command. Th
|
||||
```bash
|
||||
$ docker run -d --name mariadb -e ALLOW_EMPTY_PASSWORD=yes \
|
||||
--net phpbb-tier \
|
||||
--volume /path/to/mariadb-persistence:/bitnami/mariadb \
|
||||
--volume /path/to/mariadb-persistence:/bitnami \
|
||||
bitnami/mariadb:latest
|
||||
```
|
||||
|
||||
@@ -169,9 +163,7 @@ In this case you need to specify the directories to mount on the run command. Th
|
||||
```bash
|
||||
$ docker run -d --name phpbb -p 80:80 -p 443:443 \
|
||||
--net phpbb-tier \
|
||||
--volume /path/to/phpbb-persistence:/bitnami/phpbb \
|
||||
--volume /path/to/apache-persistence:/bitnami/apache \
|
||||
--volume /path/to/php-persistence:/bitnami/php \
|
||||
--volume /path/to/phpbb-persistence:/bitnami \
|
||||
bitnami/phpbb:latest
|
||||
```
|
||||
|
||||
@@ -190,7 +182,15 @@ Bitnami provides up-to-date versions of MariaDB and phpBB, including security pa
|
||||
* For docker-compose: `$ docker-compose stop phpbb`
|
||||
* For manual execution: `$ docker stop phpbb`
|
||||
|
||||
3. (For non-compose execution only) Create a [backup](#backing-up-your-application) if you have not mounted the phpbb folder in the host.
|
||||
3. Take a snapshot of the application state
|
||||
|
||||
```bash
|
||||
$ rsync -a /path/to/phpbb-persistence /path/to/phpbb-persistence.bkp.$(date +%Y%m%d-%H.%M.%S)
|
||||
```
|
||||
|
||||
Additionally, [snapshot the MariaDB data](https://github.com/bitnami/bitnami-docker-mariadb#step-2-stop-and-backup-the-currently-running-container)
|
||||
|
||||
You can use these snapshots to restore the application state should the upgrade fail.
|
||||
|
||||
4. Remove the currently running container
|
||||
|
||||
@@ -203,18 +203,21 @@ Bitnami provides up-to-date versions of MariaDB and phpBB, including security pa
|
||||
* For manual execution ([mount](#mount-persistent-folders-manually) the directories if needed): `docker run --name phpbb bitnami/phpbb:latest`
|
||||
|
||||
# Configuration
|
||||
|
||||
## Environment variables
|
||||
When you start the phpbb image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. If you want to add a new environment variable:
|
||||
|
||||
When you start the phpbb image, you can adjust the configuration of the instance by passing one or more environment variables either on the docker-compose file or on the docker run command line. If you want to add a new environment variable:
|
||||
|
||||
* For docker-compose add the variable name and value under the application section:
|
||||
```yaml
|
||||
phpbb:
|
||||
image: bitnami/phpbb:latest
|
||||
ports:
|
||||
- 80:80
|
||||
environment:
|
||||
- PHPBB_PASSWORD=my_password
|
||||
```
|
||||
|
||||
```yaml
|
||||
phpbb:
|
||||
image: bitnami/phpbb:latest
|
||||
ports:
|
||||
- 80:80
|
||||
environment:
|
||||
- PHPBB_PASSWORD=my_password
|
||||
```
|
||||
|
||||
* For manual execution add a `-e` option with each variable and value:
|
||||
|
||||
@@ -222,9 +225,7 @@ phpbb:
|
||||
$ docker run -d -p 80:80 -p 443:443 --name phpbb \
|
||||
-e PHPBB_PASSWORD=my_password \
|
||||
--net phpbb-tier \
|
||||
--volume /path/to/phpbb-persistence:/bitnami/phpbb \
|
||||
--volume /path/to/apache-persistence:/bitnami/apache \
|
||||
--volume /path/to/php-persistence:/bitnami/php \
|
||||
--volume /path/to/phpbb-persistence:/bitnami \
|
||||
bitnami/phpbb:latest
|
||||
```
|
||||
|
||||
@@ -241,6 +242,7 @@ Available variables:
|
||||
### SMTP Configuration
|
||||
|
||||
To configure phpBB to send email using SMTP you can set the following environment variables:
|
||||
|
||||
- `SMTP_HOST`: SMTP host.
|
||||
- `SMTP_PORT`: SMTP port.
|
||||
- `SMTP_USER`: SMTP account user.
|
||||
@@ -273,50 +275,23 @@ This would be an example of SMTP configuration using a GMail account:
|
||||
-e SMTP_USER=your_email@gmail.com \
|
||||
-e SMTP_PASSWORD=your_password
|
||||
--net phpbb-tier \
|
||||
--volume /path/to/phpbb-persistence:/bitnami/phpbb \
|
||||
--volume /path/to/apache-persistence:/bitnami/apache \
|
||||
--volume /path/to/php-persistence:/bitnami/php \
|
||||
--volume /path/to/phpbb-persistence:/bitnami \
|
||||
bitnami/phpbb:latest
|
||||
```
|
||||
|
||||
|
||||
# Backing up your application
|
||||
|
||||
To backup your application data follow these steps:
|
||||
|
||||
1. Stop the running container:
|
||||
|
||||
* For docker-compose: `$ docker-compose stop phpbb`
|
||||
* For manual execution: `$ docker stop phpbb`
|
||||
|
||||
2. Copy the phpBB data folder in the host:
|
||||
|
||||
```
|
||||
$ docker cp /path/to/phpbb-persistence:/bitnami/phpbb
|
||||
```
|
||||
|
||||
# Restoring a backup
|
||||
|
||||
To restore your application using backed up data simply mount the folder with phpBB data in the container. See [persisting your application](#persisting-your-application) section for more info.
|
||||
|
||||
# Contributing
|
||||
|
||||
We'd love for you to contribute to this container. You can request new features by creating an
|
||||
[issue](https://github.com/bitnami/bitnami-docker-phpbb/issues), or submit a
|
||||
[pull request](https://github.com/bitnami/bitnami-docker-phpbb/pulls) with your contribution.
|
||||
We'd love for you to contribute to this container. You can request new features by creating an [issue](https://github.com/bitnami/bitnami-docker-phpbb/issues), or submit a [pull request](https://github.com/bitnami/bitnami-docker-phpbb/pulls) with your contribution.
|
||||
|
||||
# Issues
|
||||
|
||||
If you encountered a problem running this container, you can file an
|
||||
[issue](https://github.com/bitnami/bitnami-docker-phpbb/issues). For us to provide better support,
|
||||
be sure to include the following information in your issue:
|
||||
If you encountered a problem running this container, you can file an [issue](https://github.com/bitnami/bitnami-docker-phpbb/issues). For us to provide better support, be sure to include the following information in your issue:
|
||||
|
||||
- Host OS and version
|
||||
- Docker version (`$ docker version`)
|
||||
- Output of `$ docker info`
|
||||
- Version of this container (`$ echo $BITNAMI_IMAGE_VERSION` inside the container)
|
||||
- The command you used to run the container, and any relevant output you saw (masking any sensitive
|
||||
information)
|
||||
- The command you used to run the container, and any relevant output you saw (masking any sensitive information)
|
||||
|
||||
# Community
|
||||
|
||||
@@ -326,7 +301,7 @@ Discussions are archived at [bitnami-oss.slackarchive.io](https://bitnami-oss.sl
|
||||
|
||||
# License
|
||||
|
||||
Copyright (c) 2016 Bitnami
|
||||
Copyright 2016-2017 Bitnami
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
|
||||
Reference in New Issue
Block a user