Skip to content

Commit

Permalink
updated to 1.29.0 and fixed long-standing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
diraneyya committed Oct 3, 2024
1 parent d695230 commit f7cf038
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.*.swp
backdrop.tar.gz
12 changes: 7 additions & 5 deletions 1/apache/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# from https://backdropcms.org/requirements
FROM php:8.1-apache
FROM php:8.3-apache

RUN a2enmod rewrite

Expand All @@ -12,17 +12,19 @@ RUN apt-get update && apt-get install -y --no-install-recommends libzip-dev libo
WORKDIR /var/www/html

# https://github.com/backdrop/backdrop/releases
ENV BACKDROP_VERSION 1.26.1
ENV BACKDROP_MD5 0a6fad09190b1f8da266f586955454a2
ENV BACKDROP_VERSION=1.29.0
ENV BACKDROP_MD5=0c358d1961e3e8b3be56cf1c2dc197f5

RUN curl -fSL "https://github.com/backdrop/backdrop/archive/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \
RUN curl -fSL "https://github.com/backdrop/backdrop/archive/refs/tags/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \
&& echo "${BACKDROP_MD5} *backdrop.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f backdrop.tar.gz \
&& rm backdrop.tar.gz \
&& chown -R www-data:www-data sites
&& chown -R www-data:www-data sites files

# Add custom entrypoint to set BACKDROP_SETTINGS correctly
COPY docker-entrypoint.sh /entrypoint.sh

EXPOSE 80

ENTRYPOINT ["/entrypoint.sh"]
CMD ["apache2-foreground"]
2 changes: 1 addition & 1 deletion 1/apache/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
fi

# lets construct our BACKDROP_SETTINGS and pass them into apache or fpm
export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"database\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"$BACKDROP_DB_HOST\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
if [[ "$1" == apache2* ]]; then
echo "PassEnv BACKDROP_SETTINGS" > /etc/apache2/conf-enabled/backdrop.conf
elif [[ "$1" == php-fpm* ]]; then
Expand Down
10 changes: 6 additions & 4 deletions 1/fpm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# from https://backdropcms.org/requirements
FROM php:8.1-fpm
FROM php:8.3-fpm

# install the PHP extensions we need
RUN apt-get update && apt-get install -y libzip-dev libonig-dev libpng-dev libjpeg-dev libpq-dev \
Expand All @@ -10,17 +10,19 @@ RUN apt-get update && apt-get install -y libzip-dev libonig-dev libpng-dev libjp
WORKDIR /var/www/html

# https://github.com/backdrop/backdrop/releases
ENV BACKDROP_VERSION 1.26.1
ENV BACKDROP_MD5 0a6fad09190b1f8da266f586955454a2
ENV BACKDROP_VERSION=1.29.0
ENV BACKDROP_MD5=0c358d1961e3e8b3be56cf1c2dc197f5

RUN curl -fSL "https://github.com/backdrop/backdrop/archive/${BACKDROP_VERSION}.tar.gz" -o backdrop.tar.gz \
&& echo "${BACKDROP_MD5} *backdrop.tar.gz" | md5sum -c - \
&& tar -xz --strip-components=1 -f backdrop.tar.gz \
&& rm backdrop.tar.gz \
&& chown -R www-data:www-data sites
&& chown -R www-data:www-data sites files

# Add custom entrypoint to set BACKDROP_SETTINGS correctly
COPY docker-entrypoint.sh /entrypoint.sh

EXPOSE 80

ENTRYPOINT ["/entrypoint.sh"]
CMD ["php-fpm"]
2 changes: 1 addition & 1 deletion 1/fpm/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ if [[ "$1" == apache2* ]] || [ "$1" == php-fpm ]; then
fi

# lets construct our BACKDROP_SETTINGS and pass them into apache or fpm
export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"database\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
export BACKDROP_SETTINGS="{\"databases\":{\"default\":{\"default\":{\"host\":\"$BACKDROP_DB_HOST\",\"port\":$BACKDROP_DB_PORT,\"username\":\"$BACKDROP_DB_USER\",\"password\":\"$BACKDROP_DB_PASSWORD\",\"database\":\"$BACKDROP_DB_NAME\",\"driver\":\"$BACKDROP_DB_DRIVER\"}}}}"
if [[ "$1" == apache2* ]]; then
echo "PassEnv BACKDROP_SETTINGS" > /etc/apache2/conf-enabled/backdrop.conf
elif [[ "$1" == php-fpm* ]]; then
Expand Down

0 comments on commit f7cf038

Please sign in to comment.