feat(): upgrade dockerfile
parent
76a82bdc23
commit
167df1e870
37
Dockerfile
37
Dockerfile
|
@ -1,4 +1,4 @@
|
|||
FROM alpine:3.10
|
||||
FROM alpine:3.11
|
||||
|
||||
LABEL description="Simple forum software for building great communities" \
|
||||
maintainer="Hardware <hardware@mondedie.fr>, Magicalex <magicalex@mondedie.fr>"
|
||||
|
@ -11,9 +11,33 @@ ENV GID=991 \
|
|||
PHP_MEMORY_LIMIT=128M \
|
||||
OPCACHE_MEMORY_LIMIT=128
|
||||
|
||||
RUN apk add --update-cache nginx s6 su-exec curl git php7 php7-fileinfo php7-phar php7-fpm php7-curl \
|
||||
php7-mbstring php7-openssl php7-json php7-pdo php7-pdo_mysql php7-mysqlnd php7-zlib php7-gd php7-dom \
|
||||
php7-ctype php7-session php7-opcache php7-xmlwriter php7-tokenizer php7-zip php7-intl \
|
||||
RUN apk add --no-progress --no-cache \
|
||||
nginx \
|
||||
s6 \
|
||||
su-exec \
|
||||
curl \
|
||||
git \
|
||||
php7 \
|
||||
php7-fileinfo \
|
||||
php7-phar \
|
||||
php7-fpm \
|
||||
php7-curl \
|
||||
php7-mbstring \
|
||||
php7-openssl \
|
||||
php7-json \
|
||||
php7-pdo \
|
||||
php7-pdo_mysql \
|
||||
php7-mysqlnd \
|
||||
php7-zlib \
|
||||
php7-gd \
|
||||
php7-dom \
|
||||
php7-ctype \
|
||||
php7-session \
|
||||
php7-opcache \
|
||||
php7-xmlwriter \
|
||||
php7-tokenizer \
|
||||
php7-zip \
|
||||
php7-intl \
|
||||
&& cd /tmp \
|
||||
&& curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
&& chmod +x /usr/local/bin/composer \
|
||||
|
@ -22,10 +46,11 @@ RUN apk add --update-cache nginx s6 su-exec curl git php7 php7-fileinfo php7-pha
|
|||
&& chown -R $UID:$GID /flarum \
|
||||
&& COMPOSER_CACHE_DIR="/tmp" su-exec $UID:$GID composer create-project --stability=beta --no-progress -- flarum/flarum /flarum/app $VERSION \
|
||||
&& composer clear-cache \
|
||||
&& rm -rf /flarum/.composer /var/cache/apk/*
|
||||
&& rm -rf /flarum/.composer /tmp/* \
|
||||
&& apk del --purge curl
|
||||
|
||||
COPY rootfs /
|
||||
RUN chmod +x /usr/local/bin/* /services/*/run /services/.s6-svscan/*
|
||||
VOLUME /flarum/app/extensions /etc/nginx/conf.d
|
||||
EXPOSE 8888
|
||||
CMD ["run.sh"]
|
||||
CMD ["/usr/local/bin/startup"]
|
||||
|
|
181
README.md
181
README.md
|
@ -1,6 +1,6 @@
|
|||
# mondedie/docker-flarum
|
||||
|
||||
![logo](https://i.imgur.com/Bjrtbsc.png "logo")
|
||||
![logo](https://i.imgur.com/Bjrtbsc.png)
|
||||
|
||||
[![](https://img.shields.io/docker/cloud/build/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum/builds)
|
||||
[![](https://img.shields.io/docker/cloud/automated/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum/builds)
|
||||
|
@ -203,181 +203,6 @@ username/my-private-repo:0.1.0
|
|||
|
||||
https://getcomposer.org/doc/03-cli.md#modifying-repositories
|
||||
|
||||
### Upgrade to v0.1.0-beta.11.1 from v0.1.0-beta.11
|
||||
### Guide for upgrade your flarum container
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
```yml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
flarum:
|
||||
image: mondedie/docker-flarum:0.1.0-beta.11.1-stable
|
||||
```
|
||||
|
||||
2 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.11.1-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d flarum
|
||||
```
|
||||
|
||||
3 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.11 from v0.1.0-beta.10
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
```yml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
flarum:
|
||||
image: mondedie/docker-flarum:0.1.0-beta.11-stable
|
||||
```
|
||||
|
||||
2 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.11-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d flarum
|
||||
```
|
||||
|
||||
3 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.10 from v0.1.0-beta.8.1
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Remove `installed.txt` file in assets folder
|
||||
|
||||
```sh
|
||||
rm /mnt/docker/flarum/assets/installed.txt
|
||||
```
|
||||
|
||||
2 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
3 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.10-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
4 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.8.1 from v0.1.0-beta.7.2
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Add `installed.txt` file in assets folder
|
||||
Make sure to mount your assets folder with the folder /flarum/app/public/assets
|
||||
|
||||
```sh
|
||||
touch /mnt/docker/flarum/assets/installed.txt
|
||||
chown UID:GID /mnt/docker/flarum/assets/installed.txt
|
||||
```
|
||||
|
||||
2 - Create your own environment file
|
||||
|
||||
```
|
||||
# vi /mnt/docker/flarum/flarum.env
|
||||
|
||||
DEBUG=false
|
||||
FORUM_URL=http://domain.tld
|
||||
|
||||
# Database configuration
|
||||
DB_HOST=mariadb
|
||||
DB_NAME=flarum
|
||||
DB_USER=flarum
|
||||
DB_PASS=xxxxxxxxxx
|
||||
DB_PREF=flarum_
|
||||
DB_PORT=3306
|
||||
|
||||
# environment variable not required
|
||||
#FLARUM_ADMIN_USER=admin
|
||||
#FLARUM_ADMIN_PASS=xxxxxxxxxx
|
||||
#FLARUM_ADMIN_MAIL=admin@domain.tld
|
||||
#FLARUM_TITLE=Test flarum
|
||||
```
|
||||
|
||||
```sh
|
||||
chown UID:GID /mnt/docker/flarum/flarum.env
|
||||
```
|
||||
|
||||
3 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
4 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.8.1-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
5 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
Since the flarum-english extension has been renamed to flarum-lang-english, you'll need to to re-enable it from the admin panel.
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.7.2 from v0.1.0-beta.6
|
||||
|
||||
:warning: Disable 3rd party extensions prior to upgrading.
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.7.2-stable
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Navigate to `yourforum.com/admin`, enter your database password and update.
|
||||
|
||||
![flarum-update](https://images.mondedie.fr/udl8j4Ue/PueJSigV.png)
|
||||
|
||||
Remove and restart your container:
|
||||
|
||||
```sh
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d
|
||||
```
|
||||
See the instructions [here](https://github.com/mondediefr/docker-flarum/blob/master/UPGRADE.md)
|
||||
|
|
|
@ -0,0 +1,180 @@
|
|||
# Guide for upgrade your flarum container
|
||||
|
||||
### Upgrade to v0.1.0-beta.11.1 from v0.1.0-beta.11
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
```yml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
flarum:
|
||||
image: mondedie/docker-flarum:0.1.0-beta.11.1-stable
|
||||
```
|
||||
|
||||
2 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.11.1-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d flarum
|
||||
```
|
||||
|
||||
3 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.11 from v0.1.0-beta.10
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
```yml
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
flarum:
|
||||
image: mondedie/docker-flarum:0.1.0-beta.11-stable
|
||||
```
|
||||
|
||||
2 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.11-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d flarum
|
||||
```
|
||||
|
||||
3 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.10 from v0.1.0-beta.8.1
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Remove `installed.txt` file in assets folder
|
||||
|
||||
```sh
|
||||
rm /mnt/docker/flarum/assets/installed.txt
|
||||
```
|
||||
|
||||
2 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
3 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.10-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
4 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.8.1 from v0.1.0-beta.7.2
|
||||
|
||||
:warning: Backup your database, config.php, composer.lock and assets folder
|
||||
:warning: Disable all 3rd party extensions prior to upgrading in panel admin.
|
||||
|
||||
1 - Add `installed.txt` file in assets folder
|
||||
Make sure to mount your assets folder with the folder /flarum/app/public/assets
|
||||
|
||||
```sh
|
||||
touch /mnt/docker/flarum/assets/installed.txt
|
||||
chown UID:GID /mnt/docker/flarum/assets/installed.txt
|
||||
```
|
||||
|
||||
2 - Create your own environment file
|
||||
|
||||
```
|
||||
# vi /mnt/docker/flarum/flarum.env
|
||||
|
||||
DEBUG=false
|
||||
FORUM_URL=http://domain.tld
|
||||
|
||||
# Database configuration
|
||||
DB_HOST=mariadb
|
||||
DB_NAME=flarum
|
||||
DB_USER=flarum
|
||||
DB_PASS=xxxxxxxxxx
|
||||
DB_PREF=flarum_
|
||||
DB_PORT=3306
|
||||
|
||||
# environment variable not required
|
||||
#FLARUM_ADMIN_USER=admin
|
||||
#FLARUM_ADMIN_PASS=xxxxxxxxxx
|
||||
#FLARUM_ADMIN_MAIL=admin@domain.tld
|
||||
#FLARUM_TITLE=Test flarum
|
||||
```
|
||||
|
||||
```sh
|
||||
chown UID:GID /mnt/docker/flarum/flarum.env
|
||||
```
|
||||
|
||||
3 - Update your docker-compose file, see an example [here](https://github.com/mondediefr/docker-flarum/tree/master#2---docker-composeyml)
|
||||
|
||||
4 - Pull the last docker images
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.8.1-stable
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
5 - Updating your database and removing old assets:
|
||||
|
||||
```sh
|
||||
docker exec -ti flarum php /flarum/app/flarum migrate
|
||||
docker exec -ti flarum php /flarum/app/flarum cache:clear
|
||||
```
|
||||
|
||||
Since the flarum-english extension has been renamed to flarum-lang-english, you'll need to to re-enable it from the admin panel.
|
||||
After that your upgrade is finish. :tada: :tada:
|
||||
|
||||
### Upgrade to v0.1.0-beta.7.2 from v0.1.0-beta.6
|
||||
|
||||
:warning: Disable 3rd party extensions prior to upgrading.
|
||||
|
||||
```sh
|
||||
docker pull mondedie/docker-flarum:0.1.0-beta.7.2-stable
|
||||
docker-compose up -d
|
||||
```
|
||||
|
||||
Navigate to `yourforum.com/admin`, enter your database password and update.
|
||||
|
||||
![flarum-update](https://images.mondedie.fr/udl8j4Ue/PueJSigV.png)
|
||||
|
||||
Remove and restart your container:
|
||||
|
||||
```sh
|
||||
docker-compose stop flarum
|
||||
docker-compose rm flarum
|
||||
docker-compose up -d
|
||||
```
|
Loading…
Reference in New Issue