clean environnement variables

This commit is contained in:
Sam
2015-11-14 23:06:59 +01:00
parent 533905e678
commit 3424f257f5
4 changed files with 35 additions and 27 deletions

View File

@@ -18,34 +18,37 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local
# DOWNLOAD AND INSTALL INVOICE NONJA
#####
WORKDIR /var/www/
ENV INVOICENINJA_VERSION 2.4.3
ENV INVOICENINJA_VERSION 2.4.2
#ENV INVOICENINJA_SHA1 3e9b63c1681b6923dc1a24399411c1abde6ef5ea
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz \
# && echo "$INVOICENINJA_SHA1 *invoiceninja.tar.gz" | sha1sum -c - \
&& tar -xzf invoiceninja.tar.gz \
&& mv invoice-ninja-${INVOICENINJA_VERSION} app \
&& rm -rf html \
&& ln -s app/public html \
&& rm invoiceninja.tar.gz \
# && chown -R www-data:www-data /var/www/ \
&& composer install --working-dir app -o
RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja/archive/v${INVOICENINJA_VERSION}.tar.gz
# RUN echo "$INVOICENINJA_SHA1 *invoiceninja.tar.gz" | sha1sum -c -
RUN tar -xzf invoiceninja.tar.gz -C /var/www/
RUN rm invoiceninja.tar.gz
RUN mv /var/www/invoiceninja-${INVOICENINJA_VERSION} /var/www/app
RUN chown -R www-data:www-data /var/www/app
RUN composer install --working-dir /var/www/app -o --no-dev --no-interaction
######
# DEFAULT ENV
######
ENV DB_HOST mysql
ENV DB_DATABASE ninja
ENV APP_KEY SomeRandomString
ENV LOG errorlog
ENV APP_DEBUG 0
#use to be mounted into nginx for exemple
VOLUME /var/www/html
VOLUME /var/www/app/public
WORKDIR /var/www/app
EXPOSE 80
COPY app-entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]