feat(): update Dockerfile
parent
ac562f51d1
commit
c5310da92a
|
@ -12,8 +12,5 @@ insert_final_newline = true
|
|||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.{diff,md}]
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.php]
|
||||
indent_size = 4
|
||||
|
|
35
Dockerfile
35
Dockerfile
|
@ -11,41 +11,16 @@ ENV GID=991 \
|
|||
PHP_MEMORY_LIMIT=128M \
|
||||
OPCACHE_MEMORY_LIMIT=128
|
||||
|
||||
RUN echo "@community http://dl-cdn.alpinelinux.org/alpine/v3.10/community" >> /etc/apk/repositories \
|
||||
&& apk add -U \
|
||||
nginx \
|
||||
s6 \
|
||||
su-exec \
|
||||
curl \
|
||||
git \
|
||||
php7@community \
|
||||
php7-fileinfo@community \
|
||||
php7-phar@community \
|
||||
php7-fpm@community \
|
||||
php7-curl@community \
|
||||
php7-mbstring@community \
|
||||
php7-openssl@community \
|
||||
php7-json@community \
|
||||
php7-pdo@community \
|
||||
php7-pdo_mysql@community \
|
||||
php7-mysqlnd@community \
|
||||
php7-zlib@community \
|
||||
php7-gd@community \
|
||||
php7-dom@community \
|
||||
php7-ctype@community \
|
||||
php7-session@community \
|
||||
php7-opcache@community \
|
||||
php7-xmlwriter@community \
|
||||
php7-tokenizer@community \
|
||||
php7-zip@community \
|
||||
php7-intl@community \
|
||||
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 \
|
||||
&& cd /tmp \
|
||||
&& curl -s http://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer \
|
||||
&& chmod +x /usr/local/bin/composer \
|
||||
&& composer global require hirak/prestissimo \
|
||||
&& composer global require --no-progress --no-suggest -- hirak/prestissimo \
|
||||
&& mkdir -p /flarum/app \
|
||||
&& chown -R $UID:$GID /flarum \
|
||||
&& COMPOSER_CACHE_DIR="/tmp" su-exec $UID:$GID composer create-project flarum/flarum /flarum/app $VERSION --stability=beta \
|
||||
&& 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/*
|
||||
|
||||
|
|
|
@ -2,6 +2,11 @@
|
|||
|
||||
![logo](https://i.imgur.com/Bjrtbsc.png "logo")
|
||||
|
||||
[![](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)
|
||||
[![](https://img.shields.io/docker/pulls/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum)
|
||||
[![](https://img.shields.io/docker/stars/mondedie/docker-flarum)](https://hub.docker.com/r/mondedie/docker-flarum)
|
||||
|
||||
### What is this ?
|
||||
|
||||
Simple forum software for building great communities. https://flarum.org/
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
exit 0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
exec nginx
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
exec php-fpm7
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# COMPOSER WRAPUP SCRIPT
|
||||
# This script allow to add new extensions to flarum
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/usr/bin/env sh
|
||||
|
||||
# Default values
|
||||
DB_HOST="${DB_HOST:-mariadb}"
|
||||
|
@ -64,7 +64,7 @@ if [ ! -e '/etc/nginx/conf.d/custom-vhost-flarum.conf' ]; then
|
|||
# }' > /etc/nginx/conf.d/custom-vhost-flarum.conf
|
||||
fi
|
||||
|
||||
# if no installation was performed before
|
||||
# if installation was performed before
|
||||
if [ -e '/flarum/app/public/assets/rev-manifest.json' ]; then
|
||||
echo "[INFO] Flarum already installed, init app..."
|
||||
|
||||
|
@ -74,8 +74,9 @@ if [ -e '/flarum/app/public/assets/rev-manifest.json' ]; then
|
|||
-e "s|<DB_USER>|${DB_USER}|g" \
|
||||
-e "s|<DB_PASS>|${DB_PASS}|g" \
|
||||
-e "s|<DB_PREF>|${DB_PREF}|g" \
|
||||
-e "s|<FORUM_URL>|${FORUM_URL}|g" /flarum/app/config.php
|
||||
-e "s|<FORUM_URL>|${FORUM_URL}|g" /flarum/app/config.php.sample
|
||||
|
||||
cp /flarum/app/config.php.sample /flarum/app/config.php
|
||||
su-exec $UID:$GID php /flarum/app/flarum cache:clear
|
||||
|
||||
# Composer cache dir and packages list paths
|
||||
|
@ -97,8 +98,8 @@ if [ -e '/flarum/app/public/assets/rev-manifest.json' ]; then
|
|||
|
||||
echo "[INFO] Init done, launch flarum..."
|
||||
else
|
||||
# if no installation was performed before
|
||||
echo "[INFO] First launch, installation..."
|
||||
rm -rf /flarum/app/config.php
|
||||
|
||||
if [ -z "${FLARUM_ADMIN_USER}" ] || [ -z "${FLARUM_ADMIN_PASS}" ] || [ -z "${FLARUM_ADMIN_MAIL}" ]; then
|
||||
echo "[ERROR] User admin info of flarum must be set !"
|
||||
|
|
Loading…
Reference in New Issue