Update docker files.

This commit is contained in:
James Cole 2018-12-22 06:45:07 +01:00
parent 91593335ef
commit 17e85ca2cf
No known key found for this signature in database
GPG Key ID: C16961E655E74B5E
2 changed files with 9 additions and 29 deletions

View File

@ -20,18 +20,6 @@ mkdir -p $FIREFLY_PATH/storage/upload
chown -R www-data:www-data -R $FIREFLY_PATH/storage chown -R www-data:www-data -R $FIREFLY_PATH/storage
chmod -R 775 $FIREFLY_PATH/storage chmod -R 775 $FIREFLY_PATH/storage
chown -R www-data:www-data -R $FIREFLY_PATH/app
chmod -R 775 $FIREFLY_PATH/app
chown -R www-data:www-data -R $FIREFLY_PATH/framework
chmod -R 775 $FIREFLY_PATH/framework
chown -R www-data:www-data -R $FIREFLY_PATH/logs
chmod -R 775 $FIREFLY_PATH/logs
chown -R www-data:www-data -R $FIREFLY_PATH/upload
chmod -R 775 $FIREFLY_PATH/upload
# remove any lingering files that may break upgrades: # remove any lingering files that may break upgrades:
rm -f $FIREFLY_PATH/storage/logs/laravel.log rm -f $FIREFLY_PATH/storage/logs/laravel.log

View File

@ -5,12 +5,8 @@ FROM php:7.2-apache
ARG CORES ARG CORES
ENV CORES ${CORES:-1} ENV CORES ${CORES:-1}
ENV FIREFLY_PATH /var/www/firefly-iii/ ENV FIREFLY_PATH=/var/www/firefly-iii/ CURL_VERSION=7.60.0 OPENSSL_VERSION=1.1.1-pre6 COMPOSER_ALLOW_SUPERUSER=1
ENV CURL_VERSION 7.60.0 LABEL version="1.2" maintainer="thegrumpydictator@gmail.com"
ENV OPENSSL_VERSION 1.1.1-pre6
ENV COMPOSER_ALLOW_SUPERUSER 1
LABEL version="1.1" maintainer="thegrumpydictator@gmail.com"
# install packages # install packages
RUN apt-get update -y && \ RUN apt-get update -y && \
@ -35,10 +31,9 @@ RUN apt-get update -y && \
supervisor \ supervisor \
locales && \ locales && \
apt-get clean && \ apt-get clean && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/* && \
# LDAP install docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && \
RUN docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/ && docker-php-ext-install ldap docker-php-ext-install ldap
# Install latest curl # Install latest curl
RUN cd /tmp && \ RUN cd /tmp && \
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && \ wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && \
@ -75,14 +70,11 @@ COPY ./.deploy/docker/cacert.pem /usr/local/ssl/cert.pem
# test crons added via crontab # test crons added via crontab
RUN echo "0 3 * * * /usr/local/bin/php /var/www/firefly-iii/artisan firefly:cron" | crontab - RUN echo "0 3 * * * /usr/local/bin/php /var/www/firefly-iii/artisan firefly:cron" | crontab -
#RUN (crontab -l ; echo "*/1 * * * * free >> /var/www/firefly-iii/public/cron.html") 2>&1 | crontab - #RUN (crontab -l ; echo "*/1 * * * * free >> /var/www/firefly-iii/public/cron.html") 2>&1 | crontab -
# Install PHP exentions.
RUN docker-php-ext-install -j$(nproc) gd intl tidy zip bcmath pdo_mysql bz2 pdo_pgsql
# Install composer # Install PHP exentions, install composer, update languages.
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer RUN docker-php-ext-install -j$(nproc) gd intl tidy zip bcmath pdo_mysql bz2 pdo_pgsql && \
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
# Generate locales supported by Firefly III echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\n\n" > /etc/locale.gen && locale-gen
RUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nfr_FR.UTF-8 UTF-8\nit_IT.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npl_PL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8\nru_RU.UTF-8 UTF-8\ntr_TR.UTF-8 UTF-8\n\n" > /etc/locale.gen && locale-gen
# copy Apache config to correct spot. # copy Apache config to correct spot.
COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf COPY ./.deploy/docker/apache2.conf /etc/apache2/apache2.conf