Firefly III: a personal finances manager
PHP accountingbudgetbudgetingbudgetscash-flowcashflowcredit-carddockerexpensesfinancefinancesfinanciallinuxmoneypaycheckpersonal-financephpphp7
New docker related files.
James Cole54ecfac550d7
diff --git a/Dockerfile b/Dockerfileindex 6dcd9cdc2d..9177d3a136 100644--- a/Dockerfile+++ b/Dockerfile@@ -1,5 +1,12 @@+# use PHP 7.1 and Apache as a base.FROM php:7.1-apache+# set working dir+ENV FIREFLY_PATH /var/www/firefly-iii+WORKDIR $FIREFLY_PATH+ADD . $FIREFLY_PATH++# install packagesRUN apt-get update -y && \apt-get install -y --no-install-recommends libcurl4-openssl-dev \zlib1g-dev \@@ -14,14 +21,16 @@ RUN apt-get update -y && \libbz2-dev \gettext-base \locales && \- apt-get clean && \- rm -rf /var/lib/apt/lists/*+ apt-get clean && \+ rm -rf /var/lib/apt/lists/*+# Install PHP exentions.RUN docker-php-ext-install -j$(nproc) curl gd intl json readline tidy zip bcmath xml mbstring pdo_sqlite pdo_mysql bz2 pdo_pgsql-# Generate locales supported by firefly+# Generate locales supported by Firefly IIIRUN echo "en_US.UTF-8 UTF-8\nde_DE.UTF-8 UTF-8\nnl_NL.UTF-8 UTF-8\npt_BR.UTF-8 UTF-8" > /etc/locale.gen && locale-gen+# copy Apache config to correct spot.COPY ./docker/apache2.conf /etc/apache2/apache2.conf# Enable apache mod rewrite..@@ -30,23 +39,23 @@ RUN a2enmod rewrite# Enable apache mod ssl..RUN a2enmod ssl+# Create volumes for several directories:+VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload+# Setup the Composer installerRUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer-# Copy Apache Configs+# Enable default site (Firefly III)COPY ./docker/apache-firefly.conf /etc/apache2/sites-available/000-default.conf-ENV FIREFLY_PATH /var/www/firefly-iii--WORKDIR $FIREFLY_PATH--# The working directory-COPY . $FIREFLY_PATH-+# Make sure we own Firefly III directoryRUN chown -R www-data:www-data /var/www && chmod -R 775 $FIREFLY_PATH/storage-RUN composer install --prefer-dist --no-dev --no-scripts+# Run composer+RUN composer install --prefer-dist --no-dev --no-scripts --no-suggest+# Expose port 80EXPOSE 80-ENTRYPOINT ["docker/entrypoint.sh"]+# Run entrypoint thing+ENTRYPOINT ["docker/entrypoint.sh"]\ No newline at end of filediff --git a/docker/docker.env b/docker/docker.envnew file mode 100644index 0000000000..7ba55b06fe--- /dev/null+++ b/docker/docker.env@@ -0,0 +1,6 @@+FF_APP_ENV=local+FF_APP_KEY=S0m3R@nd0mString0f32Ch@rsEx@ct1y+FF_DB_HOST=+FF_DB_NAME=+FF_DB_USER=+FF_DB_PASSWORD=\ No newline at end of filediff --git a/docker/entrypoint.sh b/docker/entrypoint.shindex 5f6409bf3b..088a999742 100755--- a/docker/entrypoint.sh+++ b/docker/entrypoint.sh@@ -1,5 +1,8 @@#!/bin/bash+# make sure we own the volumes:+chown -R www-data:www-data $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload+chmod -R 775 $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/uploadcat .env.docker | envsubst > .env && cat .envcomposer dump-autoload