Skip to content

Commit a1b04a5

Browse files
authored
Update to Eventum 3.7.1 (#2)
2 parents 096cae8 + 1d66f4c commit a1b04a5

File tree

6 files changed

+70
-68
lines changed

6 files changed

+70
-68
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*~
2+
/.idea/
3+
/docker-compose.override.yml

Dockerfile

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,36 @@
33
# https://github.com/eventum/eventum
44
#
55

6-
FROM php:5.6-fpm
6+
FROM phpearth/php:7.1-nginx AS base
77

8-
ARG EVENTUM_VERSION=3.3.3
9-
ARG EVENTUM_MD5=7fde18feb868ad965aa186418eccd1c1
8+
FROM base AS source
9+
RUN apk add --no-cache curl
1010

11-
WORKDIR /usr/src/eventum
11+
# download and unpack code
12+
WORKDIR /source
13+
ARG VERSION=3.7.1
14+
RUN curl -fLSs https://github.com/eventum/eventum/releases/download/v$VERSION/eventum-$VERSION.tar.xz -o eventum.tar.xz
1215

13-
# step1: install eventum code
14-
RUN set -xe \
15-
&& curl -fLSs https://github.com/eventum/eventum/releases/download/v$EVENTUM_VERSION/eventum-$EVENTUM_VERSION.tar.gz -o eventum.tgz \
16-
&& echo "$EVENTUM_MD5 *eventum.tgz" | md5sum -c - \
17-
&& tar --strip-components=1 -xzf eventum.tgz \
18-
&& rm -f eventum.tgz \
16+
ARG CHECKSUM=060b2fa8b09cebaf442c2088137998fdfce1082487d83115cafa49bf12834689
17+
RUN sha256sum eventum.tar.xz
18+
RUN echo "$CHECKSUM *eventum.tar.xz" | sha256sum -c -
19+
20+
WORKDIR /app
21+
RUN tar --strip-components=1 -xf /source/eventum.tar.xz
22+
23+
COPY php.ini /php.ini
24+
RUN chmod 644 /php.ini
25+
26+
# build runtime image
27+
FROM base
28+
RUN apk add --no-cache php7.1-gd php7.1-intl php7.1-pdo_mysql
29+
# update to use app root; required to change config as expose only subdir
30+
RUN sed -i -e '/root/ s;/var/www/html;/app/htdocs;' /etc/nginx/conf.d/default.conf
31+
32+
WORKDIR /app
33+
COPY --from=source /php.ini /etc/php/7.1/php.ini
34+
COPY --from=source /app ./
35+
RUN set -x \
1936
&& chmod -R og-rwX config var \
2037
&& chown -R www-data: config var \
2138
&& du -sh
22-
23-
# step2: install dependencies
24-
RUN set -xe \
25-
&& ln -s /usr/local/bin/php /usr/bin \
26-
&& apt-get update \
27-
&& apt-get install -y --no-install-recommends libpng-dev libmcrypt-dev \
28-
&& docker-php-ext-install pdo pdo_mysql gd mcrypt \
29-
&& apt-get remove -y zlib1g-dev libpng12-dev zlib1g-dev libmcrypt-dev \
30-
&& apt-get clean \
31-
&& rm -rfv /var/lib/apt/lists/* /tmp/* /var/tmp/* \
32-
&& php -m
33-
34-
USER www-data

docker-compose.yml

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,32 @@
11
version: '2.1'
22

3-
volumes:
4-
config:
5-
mysql:
6-
code:
7-
name: eventum-3.3.3
8-
93
services:
104
eventum:
11-
image: eventum/eventum:3.3.3
5+
build: .
126
volumes:
13-
- code:/usr/src/eventum
14-
- config:/usr/src/eventum/config
15-
links:
16-
- mysql
7+
- ./php.ini:/etc/php/7.1/php.ini
8+
ports:
9+
- "8088:80"
10+
logging:
11+
driver: json-file
12+
options:
13+
max-size: "10m"
14+
max-file: "10"
1715

1816
mysql:
19-
image: mysql:5.6
17+
image: percona:5.7
2018
volumes:
2119
- mysql:/var/lib/mysql
2220
environment:
2321
- MYSQL_ALLOW_EMPTY_PASSWORD=1
2422
- MYSQL_DATABASE=eventum
23+
logging:
24+
driver: json-file
25+
options:
26+
max-size: "10m"
27+
max-file: "10"
2528

26-
nginx:
27-
build: nginx
28-
ports:
29-
- "8088:80"
30-
links:
31-
- eventum:fpm
32-
volumes:
33-
- code:/usr/src/eventum:ro
29+
volumes:
30+
mysql:
3431

3532
# vim:ts=2:sw=2:et

nginx/Dockerfile

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

nginx/nginx.conf

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

php.ini

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
; disable production reporting
2+
; Production Value: E_ALL & ~E_DEPRECATED & ~E_STRICT
3+
; http://php.net/error-reporting
4+
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
5+
6+
; Default Value: On
7+
; Development Value: On
8+
; Production Value: Off
9+
; http://php.net/display-errors
10+
display_errors = Off
11+
12+
; Default Value: Off
13+
; Development Value: On
14+
; Production Value: On
15+
; http://php.net/log-errors
16+
log_errors = On
17+
18+
; Decides whether PHP may expose the fact that it is installed on the server
19+
; (e.g. by adding its signature to the Web server header). It is no security
20+
; threat in any way, but it makes it possible to determine whether you use PHP
21+
; on your server or not.
22+
; http://php.net/expose-php
23+
expose_php = Off

0 commit comments

Comments
 (0)