Skip to content
Open
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
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Only the files the image build actually needs enter the build context
*
!artifacts/
!cron
**/.DS_Store
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
**/.DS_Store
data_sendy/
35 changes: 16 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,28 +10,28 @@
# Run:
# $ docker run --rm -d --env-file sendy.env sendy:latest

FROM php:8.0-apache as sendy
FROM php:8.0-apache AS sendy

ARG SENDY_VER=6.0.4
ARG ARTIFACT_DIR=6.0.4
ARG SENDY_VER=7.0.6
ARG ARTIFACT_DIR=7.0.6

ENV SENDY_VERSION ${SENDY_VER}
ENV SENDY_VERSION=${SENDY_VER}

RUN apt -qq update && apt -qq upgrade -y \
# Install unzip cron
&& apt -qq install -y unzip cron \
&& apt -qq install -y --no-install-recommends unzip cron \
# Install php extension gettext
# Install php extension mysqli
&& docker-php-ext-install calendar gettext mysqli \
# Remove unused packages
&& apt autoremove -y
# Remove unused packages and apt caches
&& apt autoremove -y \
&& apt clean \
&& rm -rf /var/lib/apt/lists/*

# Copy artifacts
COPY ./artifacts/${ARTIFACT_DIR}/ /tmp

# Install Sendy
RUN unzip /tmp/sendy-${SENDY_VER}.zip -d /tmp \
&& cp -r /tmp/includes/* /tmp/sendy/includes \
# Install Sendy (artifacts are bind-mounted at build time; no COPY layer)
RUN --mount=type=bind,source=artifacts/${ARTIFACT_DIR},target=/artifacts \
unzip -q /artifacts/sendy-${SENDY_VER}.zip -d /tmp \
&& cp -r /artifacts/includes/* /tmp/sendy/includes \
&& mkdir -p /tmp/sendy/uploads/csvs \
&& chmod -R 777 /tmp/sendy/uploads \
&& rm -rf /var/www/html \
Expand All @@ -46,11 +46,8 @@ RUN unzip /tmp/sendy-${SENDY_VER}.zip -d /tmp \
Header unset \"X-Powered-By\"\n" >> /var/www/html/.htaccess \
&& printf "[PHP]\nerror_reporting = E_ALL & ~E_NOTICE & ~E_STRICT & ~E_DEPRECATED\n" > /usr/local/etc/php/conf.d/error_reporting.ini

# Apache config
RUN a2enconf serverName

# Apache modules
RUN a2enmod rewrite headers
# Apache config and modules
RUN a2enconf serverName && a2enmod rewrite headers

# Copy hello-cron file to the cron.d directory
COPY cron /etc/cron.d/cron
Expand All @@ -68,7 +65,7 @@ CMD ["apache2-foreground"]
#######################
# XDEBUG Installation
#######################
FROM sendy as debug
FROM sendy AS debug
# Install xdebug extension
RUN pecl channel-update pecl.php.net \
&& pecl install xdebug \
Expand Down
Binary file not shown.