small optimizations
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Robert Kaussow 2019-07-03 09:04:01 +02:00
parent 8fe77227a9
commit 1a40a2dcdc
5 changed files with 25 additions and 20 deletions

8
.dockerignore Normal file
View File

@ -0,0 +1,8 @@
.git
.git*
.drone.*
*.md
.dockerignore
Dockerfile
Dockerfile.*
docker-compose.yml

View File

@ -1,25 +1,22 @@
FROM alpine:3.10.0 FROM alpine:3.10.0
ARG TTRSS_VERSION ARG TTRSS_VERSION=master
ARG TTRSS_TARBALL=https://git.tt-rss.org/git/tt-rss/archive/${TT_RSS_VERSION}.tar.gz ARG TTRSS_TARBALL=https://git.tt-rss.org/git/tt-rss/archive/${TTRSS_VERSION}.tar.gz
ARG TTRSS_MASTER=https://git.tt-rss.org/fox/tt-rss.git
RUN apk update && \ RUN apk --update add --virtual .build-deps tar curl && \
apk add gomplate openssl unzip nginx bash git ca-certificates s6 curl ssmtp mailx php7 php7-curl \ apk --update add s6 nginx ca-certificates ssmtp mailx php7 php7-curl \
php7-fpm php7-xml php7-dom php7-opcache php7-iconv php7-pdo php7-pdo_mysql php7-mysqli php7-mysqlnd \ php7-fpm php7-xml php7-dom php7-opcache php7-iconv php7-pdo php7-pdo_mysql php7-mysqli php7-mysqlnd \
php7-pdo_pgsql php7-pgsql php7-gd php7-mcrypt php7-posix php7-ldap php7-json php7-mbstring \ php7-pdo_pgsql php7-pgsql php7-gd php7-mcrypt php7-posix php7-ldap php7-json php7-mbstring \
php7-session php7-fileinfo php7-intl php7-pcntl && \ php7-session php7-fileinfo php7-intl php7-pcntl && \
rm -rf /var/cache/apk/* && \
rm -rf /var/www/localhost && \ rm -rf /var/www/localhost && \
rm -f /etc/php7/php-fpm.d/www.conf && \ rm -f /etc/php7/php-fpm.d/www.conf && \
mkdir -p /var/www/app && \ mkdir -p /var/www/app && \
if [ -z ${TTRSS_VERSION+x} ]; then \ curl -SsL -o /usr/local/bin/gomplate https://github.com/hairyhenderson/gomplate/releases/download/v3.5.0/gomplate_linux-amd64-slim && \
git clone ${TTRSS_MASTER} /var/www/app; \ chmod 755 /usr/local/bin/gomplate && \
else \ curl -SsL ${TTRSS_TARBALL} | tar xz -C /var/www/app/ --strip-components=1 && \
curl -o /tmp/ttrss.tar.gz -L ${TTRSS_TARBALL}.tar.gz && \ apk del .build-deps && \
tar xf /tmp/ttrss.tar.gz -C /var/www/app/ --strip-components=1 && \ rm -rf /var/cache/apk/* && \
rm -rf /tmp/*; \ rm -rf /tmp/*
fi
ADD overlay/ / ADD overlay/ /

View File

@ -5,7 +5,9 @@ services:
image: xoxys/ttrss:latest image: xoxys/ttrss:latest
ports: ports:
- "80:80" - "80:80"
depends_on:
- db
db: db:
image: postgres image: postgres
environment: environment:

View File

@ -6,8 +6,7 @@ tags:
{{/each}} {{/each}}
{{/if}} {{/if}}
manifests: manifests:
- - image: xoxys/ttrss:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
image: xoxys/ttrss:{{#if build.tag}}{{trimPrefix "v" build.tag}}-{{/if}}linux-amd64
platform: platform:
architecture: amd64 architecture: amd64
os: linux os: linux

View File

@ -1,7 +1,6 @@
#!/bin/bash #!/bin/sh
/usr/local/bin/gomplate -V -o /etc/php7/php.ini -f /etc/templates/php.ini.tmpl
/usr/bin/gomplate -V -o /etc/php7/php.ini -f /etc/templates/php.ini.tmpl /usr/local/bin/gomplate -V -o /var/www/app/config.php -f /etc/templates/config.php.tmpl
/usr/bin/gomplate -V -o /var/www/app/config.php -f /etc/templates/config.php.tmpl
chown -R nginx:nginx /var/www/app/lock chown -R nginx:nginx /var/www/app/lock
chown -R nginx:nginx /var/www/app/cache chown -R nginx:nginx /var/www/app/cache