mirror of
https://github.com/invoiceninja/dockerfiles.git
synced 2025-12-31 19:47:25 +01:00
dockerfile complete
This commit is contained in:
31
Dockerfile
31
Dockerfile
@@ -1,20 +1,27 @@
|
||||
FROM php:fpm
|
||||
|
||||
#####
|
||||
# SYSTEM REQUIREMENT
|
||||
#####
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libmcrypt-dev zlib1g-dev git\
|
||||
&& docker-php-ext-install iconv mcrypt mbstring pdo pdo_mysql zip
|
||||
|
||||
#####
|
||||
# INSTALL COMPOSER
|
||||
#####
|
||||
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
|
||||
|
||||
|
||||
#####
|
||||
# DOWNLOAD AND INSTALL INVOICE NONJA
|
||||
#####
|
||||
|
||||
WORKDIR /var/www/
|
||||
|
||||
ENV INVOICENINJA_VERSION 2.4.3
|
||||
#ENV INVOICENINJA_SHA1 3e9b63c1681b6923dc1a24399411c1abde6ef5ea
|
||||
|
||||
ENV DB_HOST mysql
|
||||
ENV LOG errorlog
|
||||
ENV APP_DEBUG 0
|
||||
|
||||
WORKDIR /var/www/
|
||||
|
||||
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 \
|
||||
@@ -25,9 +32,21 @@ RUN curl -o invoiceninja.tar.gz -SL https://github.com/hillelcoren/invoice-ninja
|
||||
# && chown -R www-data:www-data /var/www/ \
|
||||
&& composer install --working-dir app -o
|
||||
|
||||
|
||||
######
|
||||
# DEFAULT ENV
|
||||
######
|
||||
ENV DB_HOST mysql
|
||||
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/storage
|
||||
VOLUME /var/www/app/public/logo
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ db:
|
||||
MYSQL_ROOT_PASSWORD: mdp
|
||||
|
||||
app:
|
||||
build: .
|
||||
image: invoice-ninja
|
||||
links:
|
||||
- db:mysql
|
||||
environment:
|
||||
@@ -17,6 +17,9 @@ app:
|
||||
- DB_PASSWORD=pass
|
||||
- DB_DATABASE=ninja
|
||||
- DB_HOST=mysql
|
||||
volumes:
|
||||
- ./data/storage:/var/www/app/storage:rw
|
||||
- ./data/logo:/var/www/app/public/logo:rw
|
||||
|
||||
web:
|
||||
image: nginx
|
||||
|
||||
Reference in New Issue
Block a user