mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-22 08:56:39 -06:00
New docker related files.
This commit is contained in:
parent
11b5a0294e
commit
54ecfac550
33
Dockerfile
33
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 packages
|
||||
RUN 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 III
|
||||
RUN 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 installer
|
||||
RUN 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 directory
|
||||
RUN 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 80
|
||||
EXPOSE 80
|
||||
|
||||
# Run entrypoint thing
|
||||
ENTRYPOINT ["docker/entrypoint.sh"]
|
6
docker/docker.env
Normal file
6
docker/docker.env
Normal file
@ -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=
|
@ -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/upload
|
||||
|
||||
cat .env.docker | envsubst > .env && cat .env
|
||||
composer dump-autoload
|
||||
|
Loading…
Reference in New Issue
Block a user