Skip to content

Commit 3e35860

Browse files
committed
Update Dockerfile and remove entrypoint.sh, use default entrypoint of firefly with some mod
1 parent 0b5cc47 commit 3e35860

File tree

2 files changed

+26
-39
lines changed

2 files changed

+26
-39
lines changed

Dockerfile

Lines changed: 26 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ FROM arm32v6/alpine:latest
22

33
ENV FF_VERSION 4.8.2
44

5-
ENV FF_APP_KEY=SomeRandomStringOf32CharsExactly
6-
ENV FF_APP_ENV=production
5+
ENV APP_ENV=local
76

8-
COPY entrypoint.sh /
7+
# See also: https://github.com/JC5/firefly-iii-base-image
8+
9+
ENV FIREFLY_PATH=/var/www/localhost/htdocs/firefly COMPOSER_ALLOW_SUPERUSER=1
910

1011
RUN apk update && apk add --no-cache \
1112
php7 \
@@ -24,36 +25,48 @@ RUN apk update && apk add --no-cache \
2425
php7-pdo_mysql \
2526
php7-pdo_pgsql \
2627
php7-tokenizer \
28+
php7-fileinfo \
29+
php7-gd \
30+
php7-simplexml \
31+
php7-xml \
32+
php7-ldap \
33+
php7-iconv \
34+
php7-dom \
2735
supervisor \
2836
gettext \
2937
curl \
3038
nginx \
3139
tzdata && \
32-
mkdir -p /var/www/localhost/htdocs/firefly /run/nginx && \
33-
curl -sSL https://github.com/firefly-iii/firefly-iii/archive/${FF_VERSION}.tar.gz | tar xz -C /var/www/localhost/htdocs/firefly --strip-components=1 && \
34-
cd /var/www/localhost/htdocs/firefly && \
40+
mkdir -p $FIREFLY_PATH /run/nginx && \
41+
curl -sSL https://github.com/firefly-iii/firefly-iii/archive/${FF_VERSION}.tar.gz | tar xz -C $FIREFLY_PATH --strip-components=1 && \
42+
cd $FIREFLY_PATH && \
3543
curl -sSL https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer && \
3644
composer install --prefer-dist --no-dev --no-scripts && \
3745
find /var/www/localhost/htdocs/ -type d -exec chmod 770 {} \; && \
3846
find /var/www/localhost/htdocs/ -type f -exec chmod 660 {} \; && \
3947
chown -R nginx:nobody /var/www/localhost/htdocs/ && \
40-
chmod +x /entrypoint.sh
48+
chmod +x $FIREFLY_PATH/.deploy/docker/entrypoint.sh
4149

4250

43-
RUN ln -s /tmp/test/.env /var/www/localhost/htdocs/firefly/.env
44-
4551
COPY custom.conf /etc/nginx/conf.d/default.conf
4652
COPY supervisord.conf /tmp/
4753

48-
VOLUME /tmp/test/
54+
WORKDIR $FIREFLY_PATH
55+
56+
# Create volumes
57+
VOLUME $FIREFLY_PATH/storage/export $FIREFLY_PATH/storage/upload
4958

50-
WORKDIR /var/www/localhost/htdocs/firefly
5159

5260
EXPOSE 80
5361

54-
ENTRYPOINT ["/entrypoint.sh"]
62+
RUN sed -i 's/chown -R www-data:www-data -R $FIREFLY_PATH/chown -R nginx:nobody $FIREFLY_PATH/g' ${FIREFLY_PATH}/.deploy/docker/entrypoint.sh && \
63+
sed -i 's/exec apache2-foreground/\/usr\/bin\/supervisord -c \/tmp\/supervisord.conf/g' ${FIREFLY_PATH}/.deploy/docker/entrypoint.sh && \
64+
sed -i 's/#!\/bin\/bash/#!\/usr\/bin\/env sh/g' ${FIREFLY_PATH}/.deploy/docker/entrypoint.sh && \
65+
sed -i 's/echo \"Now in entrypoint.sh for Firefly III\"/echo \"Now in entrypoint.sh for Firefly III\" \&\& env > "${FIREFLY_PATH}"\/.env/g' ${FIREFLY_PATH}/.deploy/docker/entrypoint.sh
66+
67+
68+
ENTRYPOINT $FIREFLY_PATH/.deploy/docker/entrypoint.sh
5569

5670
LABEL url=https://github.com/firefly-iii/firefly-iii/
5771
LABEL version=${FF_VERSION}
5872

59-
CMD ["/usr/bin/supervisord", "-c /tmp/supervisord.conf"]

entrypoint.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)