Improve docker file and compose yaml

This commit is contained in:
tchapi 2019-12-02 13:01:12 +01:00
parent bd131edab3
commit 69e85ac010
4 changed files with 6 additions and 29 deletions

View File

@ -4,26 +4,6 @@ LABEL maintainer="tchap@tchap.me"
ARG version
# Mail : configuration for ssmtp
ARG email
ARG mail_host
ARG hostname
ARG mail_username
ARG mail_password
# Mail : compile ssmtp
RUN curl -O http://cdn-fastly.deb.debian.org/debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2 && \
bunzip2 ssmtp_2.64.orig.tar.bz2 && \
tar -xvf ssmtp_2.64.orig.tar && \
cd ssmtp-2.64 && ./configure && make && \
echo "echo 'Skipping config generation'" > generate_config && make install && \
cd .. && rm -rf ssmtp-2.64 && rm ssmtp_2.64.orig.tar
COPY configurations/php-mail.ini /usr/local/etc/php/conf.d/mail.ini
RUN echo "root=${email}\nmailhub=${mail_host}\nrewriteDomain= \
\nhostname=${hostname}\nFromLineOverride=YES \
\nAuthUser=${mail_username}\nAuthPass=${mail_password}\n" > /usr/local/etc/ssmtp/ssmtp.conf
# Run update, and gets basic packages
RUN apt-get update && apt-get install -y --no-install-recommends \
curl \
@ -38,6 +18,9 @@ RUN docker-php-ext-configure pdo_mysql --with-pdo-mysql=mysqlnd \
&& docker-php-ext-install intl \
&& docker-php-source delete
# Set timezone correctly
COPY configurations/timezone.ini /usr/local/etc/php/conf.d/timezone.ini
# Davis installation
RUN cd /var/www/ && curl --silent -o ${version}.tar.gz -L https://github.com/tchapi/davis/archive/v${version}.tar.gz \
&& tar xvzf ${version}.tar.gz \

View File

@ -1,2 +0,0 @@
[mail function]
sendmail_path = "/usr/local/sbin/ssmtp -t"

View File

@ -0,0 +1 @@
date.timezone = "Europe/Paris"

View File

@ -27,13 +27,8 @@ services:
context: ./
dockerfile: ./Dockerfile
args:
version: "1.2.0"
email: ${INVITE_FROM_ADDRESS}
mail_host: ${MAIL_HOST}
hostname: ${HOSTNAME}
mail_username: ${MAIL_USERNAME}
mail_password: ${MAIL_PASSWORD}
image: davis:1.2.0
version: "1.4.3"
image: davis:1.4.3
container_name: davis
env_file: .env
depends_on: