Compare commits

..

13 Commits

Author SHA1 Message Date
Samuel Laulhau
a963db2b63 4.5.16 2019-10-28 09:31:53 +01:00
Robin Chan
26a71f7f1f if web starts first without app, nginx will quit 2019-10-13 21:01:40 +02:00
Sam
af98f696b9 3.5.15 2019-10-08 10:09:00 +02:00
Martin Honermeyer
696d3b356a Unzip quietly 2019-09-19 09:38:01 +02:00
Samuel Laulhau
0ef00831f6 use stretch image
this is a work around for freetype on buster
2019-07-23 09:46:07 +02:00
Sam
6ba1f11221 4.5.14 2019-07-22 09:46:45 +02:00
Geoffroy Empain
933748e15b Use the correct docker host for mysql
`mysql` is not a valid host. The container name is `db` as specified by the `docker-compose.yml`.
2019-07-05 09:53:23 +02:00
Sam
03180fc65e 4.5.13 2019-05-27 10:35:50 +02:00
Stanislav Shupilkin
e0fcb50ecb Update docker-compose.yml 2019-03-27 14:34:16 +01:00
Stanislav Shupilkin
5c418c474e Change Dockerfile, remove deprecated MAINTAINER section, separate stage on two 2019-03-27 14:34:16 +01:00
Sam
5e59ec10e3 4.5.12 2019-03-26 09:59:53 +01:00
Sam
6b0182e712 4.5.11 2019-03-04 21:04:24 +01:00
Sam
961282a90e 4.5.10 2019-02-21 10:46:35 +01:00
4 changed files with 70 additions and 34 deletions

View File

@@ -1,22 +1,37 @@
FROM php:7.2-fpm ARG PHP_IMAGE_TAG=7.2-fpm-stretch
FROM php:${PHP_IMAGE_TAG}
MAINTAINER Samuel Laulhau <sam@lalop.co> LABEL maintainer="Samuel Laulhau <sam@lalop.co>"
##### #####
# SYSTEM REQUIREMENT # SYSTEM REQUIREMENT
##### #####
ENV PHANTOMJS phantomjs-2.1.1-linux-x86_64 ENV BUILD_DEPS \
zlib1g-dev \
git \
libgmp-dev \
unzip \
libfreetype6-dev \
libjpeg62-turbo-dev \
libpng-dev \
build-essential \
chrpath \
libssl-dev \
libxft-dev \
libfreetype6 \
libfontconfig1 \
libfontconfig1-dev
RUN apt-get update \ RUN apt-get update \
&& apt-get install -y --no-install-recommends \ && apt-get install -y --no-install-recommends $BUILD_DEPS \
zlib1g-dev git libgmp-dev unzip \
libfreetype6-dev libjpeg62-turbo-dev libpng-dev \
build-essential chrpath libssl-dev libxft-dev \
libfreetype6 libfontconfig1 libfontconfig1-dev \
&& ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \ && ln -s /usr/include/x86_64-linux-gnu/gmp.h /usr/local/include/ \
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \ && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-configure gmp \ && docker-php-ext-configure gmp \
&& docker-php-ext-install iconv mbstring pdo pdo_mysql zip gd gmp opcache \ && docker-php-ext-install iconv mbstring pdo pdo_mysql zip gd gmp opcache
&& curl -o ${PHANTOMJS}.tar.bz2 -SL https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS}.tar.bz2 \
ENV PHANTOMJS phantomjs-2.1.1-linux-x86_64
# Install PHANTOMJS
RUN curl -o ${PHANTOMJS}.tar.bz2 -SL https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS}.tar.bz2 \
&& tar xvjf ${PHANTOMJS}.tar.bz2 \ && tar xvjf ${PHANTOMJS}.tar.bz2 \
&& rm ${PHANTOMJS}.tar.bz2 \ && rm ${PHANTOMJS}.tar.bz2 \
&& mv ${PHANTOMJS} /usr/local/share \ && mv ${PHANTOMJS} /usr/local/share \
@@ -38,10 +53,10 @@ RUN { \
# DOWNLOAD AND INSTALL INVOICE NINJA # DOWNLOAD AND INSTALL INVOICE NINJA
##### #####
ENV INVOICENINJA_VERSION 4.5.9 ENV INVOICENINJA_VERSION 4.5.16
RUN curl -o ninja.zip -SL https://download.invoiceninja.com/ninja-v${INVOICENINJA_VERSION}.zip \ RUN curl -o ninja.zip -SL https://download.invoiceninja.com/ninja-v${INVOICENINJA_VERSION}.zip \
&& unzip ninja.zip -d /var/www/ \ && unzip -q ninja.zip -d /var/www/ \
&& rm ninja.zip \ && rm ninja.zip \
&& mv /var/www/ninja /var/www/app \ && mv /var/www/ninja /var/www/app \
&& mv /var/www/app/storage /var/www/app/docker-backup-storage \ && mv /var/www/app/storage /var/www/app/docker-backup-storage \

View File

@@ -1,6 +1,7 @@
FROM php:7.2-fpm-alpine ARG PHP_IMAGE_TAG=7.2-fpm-alpine
FROM php:${PHP_IMAGE_TAG}
MAINTAINER Samuel Laulhau <sam@lalop.co> LABEL maintainer="Samuel Laulhau <sam@lalop.co>"
##### #####
# SYSTEM REQUIREMENT # SYSTEM REQUIREMENT
@@ -35,7 +36,7 @@ RUN { \
# DOWNLOAD AND INSTALL INVOICE NINJA # DOWNLOAD AND INSTALL INVOICE NINJA
##### #####
ENV INVOICENINJA_VERSION 4.5.9 ENV INVOICENINJA_VERSION 4.5.16
RUN curl -o ninja.zip -SL https://download.invoiceninja.com/ninja-v${INVOICENINJA_VERSION}.zip \ RUN curl -o ninja.zip -SL https://download.invoiceninja.com/ninja-v${INVOICENINJA_VERSION}.zip \
&& unzip ninja.zip -d /var/www/ \ && unzip ninja.zip -d /var/www/ \

View File

@@ -7,7 +7,7 @@ APP_KEY=SomeRandomStringSomeRandomString
APP_CIPHER=AES-256-CBC APP_CIPHER=AES-256-CBC
DB_USERNAME=root DB_USERNAME=root
DB_PASSWORD=pwd DB_PASSWORD=pwd
DB_HOST=mysql DB_HOST=db
DB_DATABASE=ninja DB_DATABASE=ninja
MAIL_HOST=mail.service.host MAIL_HOST=mail.service.host
MAIL_USERNAME=username MAIL_USERNAME=username

View File

@@ -1,4 +1,15 @@
version: "2" version: '3.6'
volumes:
db:
storage:
logo:
public:
# uncomment if you want to use external network (example network: "web")
#networks:
# web:
# external: true
services: services:
db: db:
@@ -6,36 +17,47 @@ services:
env_file: .env env_file: .env
restart: always restart: always
volumes: volumes:
- data-volume:/var/lib/mysql - db:/var/lib/mysql
networks:
- default
app: app:
image: invoiceninja/invoiceninja image: invoiceninja/invoiceninja
links:
- db:mysql
env_file: .env env_file: .env
restart: always restart: always
depends_on:
- db
volumes: volumes:
- ./srv/invoiceninja/storage:/var/www/app/storage:rw - storage:/var/www/app/storage
- ./srv/invoiceninja/logo:/var/www/app/public/logo:rw - logo:/var/www/app/public/logo
- public:/var/www/app/public
networks:
- default
web: web:
image: nginx:1 image: nginx:1
volumes: volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro - ./nginx.conf:/etc/nginx/nginx.conf:ro
links: - storage:/var/www/app/storage
- logo:/var/www/app/public/logo
- public:/var/www/app/public
expose: # Expose ports without publishing them to the host machine - theyll only be accessible to linked services.
- "80"
depends_on:
- app - app
volumes_from: ports: # Delete if you want to use reverse proxy
- app
ports:
- 8000:80 - 8000:80
networks:
# - web # uncomment if you want to use external network (reverse proxy for example)
- default
cron: cron:
image: invoiceninja/invoiceninja image: invoiceninja/invoiceninja
links:
- db:mysql
env_file: .env env_file: .env
volumes_from: volumes:
- app - storage:/var/www/app/storage
- logo:/var/www/app/public/logo
- public:/var/www/app/public
entrypoint: | entrypoint: |
bash -c 'bash -s <<EOF bash -c 'bash -s <<EOF
trap "break;exit" SIGHUP SIGINT SIGTERM trap "break;exit" SIGHUP SIGINT SIGTERM
@@ -46,7 +68,5 @@ services:
sleep 1d sleep 1d
done done
EOF' EOF'
networks:
volumes: - default
data-volume: