Non-working! Still trying to bring container to life

This commit is contained in:
Andreas Ihrig 2018-11-09 15:34:49 +01:00
parent 7404f3373f
commit 9b5ebb54eb
2 changed files with 11 additions and 37 deletions

View File

@ -4,8 +4,6 @@ FROM cloudron/base:1.0.0@sha256:147a648a068a2e746644746bbfb42eb7a50d682437cead3c
ENV FIREFLY_VERSION 4.7.8
ENV FIREFLY_PATH /app/code
ENV CURL_VERSION 7.60.0
ENV OPENSSL_VERSION 1.1.1-pre6
ENV COMPOSER_ALLOW_SUPERUSER 1
LABEL version="1.0" maintainer="robomod@xeac.org"
@ -13,42 +11,13 @@ LABEL version="1.0" maintainer="robomod@xeac.org"
## Prepare third parties
# Install packages
RUN apt-get update -y && \
apt-get install -y --no-install-recommends libjpeg-turbo8-dev \
libpng-dev \
libldap2-dev \
libedit-dev \
libtidy-dev \
libsqlite3-dev \
libbz2-dev \
cron \
apt-get install -y --no-install-recommends php-bcmath \
cron \
rsyslog \
locales && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Install latest curl
RUN cd /tmp && \
wget https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz && \
tar -xvf openssl-${OPENSSL_VERSION}.tar.gz && \
cd openssl-${OPENSSL_VERSION} && \
./config && \
make -j${CORES} && \
make install
RUN cd /tmp && \
wget https://curl.haxx.se/download/curl-${CURL_VERSION}.tar.gz && \
tar -xvf curl-${CURL_VERSION}.tar.gz && \
cd curl-${CURL_VERSION} && \
./configure --with-ssl --host=$(gcc -dumpmachine) && \
make -j${CORES} && \
make install
# Make sure that libcurl is using the newer curl libaries
RUN echo "/usr/local/lib" >> /etc/ld.so.conf.d/00-curl.conf && ldconfig
# Fix the link to curl:
RUN rm -rf /usr/local/lib/libcurl.so.4 && ln -s /usr/lib/x86_64-linux-gnu/libcurl.so.4.4.0 /usr/local/lib/libcurl.so.4
## Configure system
# Generate locales supported by Firefly III
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
@ -77,6 +46,13 @@ RUN wget "https://github.com/firefly-iii/firefly-iii/archive/${FIREFLY_VERSION}.
# Run composer
RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest
RUN composer dump-autoload -o
# Setup environment
RUN cat .env.docker | envsubst > .env
# Set owner
RUN chown -R www-data:www-data /app/code
# Expose port
EXPOSE 3000

View File

@ -16,14 +16,12 @@ mkdir -p $FIREFLY_PATH/storage/upload
# make sure we own the volumes:
chown -R www-data:www-data -R $FIREFLY_PATH/storage
chown -R www-data:www-data $FIREFLY_PATH/storage
chmod -R 775 $FIREFLY_PATH/storage
# remove any lingering files that may break upgrades:
rm -f $FIREFLY_PATH/storage/logs/laravel.log
cat .env.docker | envsubst > .env
composer dump-autoload
php artisan package:discover
php artisan firefly:instructions install
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf --nodaemon
exec /usr/bin/supervisord -c /etc/supervisor/supervisord.conf --nodaemon