forked from galette-community/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
76 lines (58 loc) · 2.62 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Using PHP-Apache image
FROM php:7.4-apache
# Maintained by Hiob for Galette community
MAINTAINER Hiob <[email protected]>
LABEL version="1.0.0"
LABEL description="PHP 7.4 / Apache 2 / Galette 0.9.3.1"
# Install dependencies
RUN a2enmod rewrite
RUN apt-get -y update && apt-get install -y \
cron \
wget \
libfreetype6-dev \
libicu-dev \
libjpeg62-turbo-dev \
libpng-dev \
libtidy-dev
RUN docker-php-ext-install -j$(nproc) tidy gettext intl mysqli pdo_mysql && \
docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ && \
docker-php-ext-install -j$(nproc) gd
# Enabling apache vhost
COPY vhost.conf /etc/apache2/sites-available/vhost.conf
# Changing DOCUMENT ROOT
RUN mkdir /var/www/galette
ENV APACHE_DOCUMENT_ROOT /var/www/galette
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
# Galette ENV
ENV GALETTE_VERSION 0.9.3.1
ENV GALETTE_INSTALL /var/www/galette
ENV GALETTE_DATA /var/www/galette/data
ENV GALETTE_CONFIG /var/www/galette/config
ENV GALETTE_WEBROOT /var/www/galette/webroot
# Install Galette
RUN cd /usr/src; wget http://download.tuxfamily.org/galette/galette-${GALETTE_VERSION}.tar.bz2
RUN cd /usr/src; tar jxvf galette-${GALETTE_VERSION}.tar.bz2; mv galette-${GALETTE_VERSION}/galette/* ${GALETTE_INSTALL} ; rm galette-${GALETTE_VERSION}.tar.bz2
# Install plugins
## Events
RUN cd ${GALETTE_INSTALL}/plugins; wget https://download.tuxfamily.org/galette/plugins/galette-plugin-events-1.2.0.tar.bz2
RUN cd ${GALETTE_INSTALL}/plugins; tar jxvf galette-plugin-events-1.2.0.tar.bz2; rm galette-plugin-events-1.2.0.tar.bz2
## Maps
RUN cd ${GALETTE_INSTALL}/plugins; wget https://download.tuxfamily.org/galette/plugins/galette-plugin-maps-1.4.0.tar.bz2
RUN cd ${GALETTE_INSTALL}/plugins; tar jxvf galette-plugin-maps-1.4.0.tar.bz2; rm galette-plugin-maps-1.4.0.tar.bz2
## Paypal
RUN cd ${GALETTE_INSTALL}/plugins; wget https://download.tuxfamily.org/galette/plugins/galette-plugin-paypal-1.7.0.tar.bz2
RUN cd ${GALETTE_INSTALL}/plugins; tar jxvf galette-plugin-paypal-1.7.0.tar.bz2; rm galette-plugin-paypal-1.7.0.tar.bz2
# Cron auto-reminder
## Copy galette-cron file to the cron.d directory
COPY galette-cron /etc/cron.d/galette-cron
## Give execution rights on the cron job
RUN chmod 0644 /etc/cron.d/galette-cron
## Apply cron job
RUN crontab /etc/cron.d/galette-cron
# Mount volumes
VOLUME $GALETTE_DATA
VOLUME $GALETTE_CONFIG
# Chown /var/www/galette
RUN chown -R www-data:www-data ${GALETTE_INSTALL}
RUN chmod -R 0755 ${GALETTE_DATA}