-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
46 lines (33 loc) · 1.19 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM silintl/php7:7.4
LABEL maintainer="Chris Hubbard <[email protected]>"
ENV REFRESHED_AT 2022-03-17
# Install require packages
RUN apt-get update && apt-get install -y \
cron \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
COPY build/appbuilder.conf /etc/apache2/sites-enabled/
# Copy in cron configuration
COPY build/appbuilder-cron /etc/cron.d/
RUN chmod 0644 /etc/cron.d/appbuilder-cron
RUN mkdir -p /data
RUN curl https://raw.githubusercontent.com/silinternational/s3-expand/master/s3-expand > /usr/local/bin/s3-expand
RUN chmod a+x /usr/local/bin/s3-expand
# Copy in syslog config
RUN rm -f /etc/rsyslog.d/*
COPY build/rsyslog.conf /etc/rsyslog.conf
# Copy logrotate file to manage logs
COPY build/sab /etc/logrotate.d
RUN chmod 0644 /etc/logrotate.d/sab
# It is expected that /data is = application/ in project folder
COPY application/ /data/
WORKDIR /data
# Fix folder permissions
RUN chown -R www-data:www-data \
console/runtime/ \
frontend/runtime/ \
frontend/web/assets/
# Install/cleanup composer dependencies
RUN composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader
EXPOSE 80
ENTRYPOINT ["s3-expand"]
CMD ["/data/run.sh"]