Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated to 1.29.2 and fixed long-standing issues #19 #20 #48 #69

Merged
merged 2 commits into from
Dec 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
18 changes: 18 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
services:
backdrop:
build:
context: ./1/apache
ports:
- 8088:80
environment:
BACKDROP_DB_HOST: db
BACKDROP_DB_USER: backdrop
BACKDROP_DB_PASSWORD: backdrop

db:
image: mysql
environment:
MYSQL_USER: backdrop
MYSQL_PASSWORD: backdrop
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: backdrop