Skip to content

Commit 68159aa

Browse files
committed
Merge branch 'master' of github.com:elmsln/HAXcms
2 parents ca21581 + 9b0412c commit 68159aa

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

Dockerfile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
FROM php:7.3-apache
2-
1+
FROM php:7.4-apache
32
# Adds jpeg-support for gd
43
RUN apt-get update && apt-get install -y \
54
libfreetype6-dev \
@@ -8,8 +7,13 @@ RUN apt-get update && apt-get install -y \
87
git \
98
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
109
&& docker-php-ext-install -j$(nproc) gd
11-
10+
# Enable rewrite
1211
RUN a2enmod rewrite
12+
# Copy custom apache conf
1313
COPY ./system/docker/apache2.conf /etc/apache2/apache2.conf
14-
14+
# Customize the php entrypoint to clean up permissions
15+
COPY ./system/docker/docker-php-entrypoint /usr/local/bin/
16+
# Make sure the entrypoint is executable
17+
RUN chmod +x /usr/local/bin/docker-php-entrypoint
18+
# Copy HAXcms into the web root directory
1519
COPY --chown=www-data:www-data . /var/www/html
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
set -e
3+
4+
# first arg is `-f` or `--some-option`
5+
if [ "${1#-}" != "$1" ]; then
6+
set -- apache2-foreground "$@"
7+
fi
8+
9+
echo "updating permissions"
10+
find /var/www/html -not -user www-data -execdir chown www-data:www-data {} \+
11+
12+
exec "$@"

0 commit comments

Comments
 (0)