Skip to content

Commit

Permalink
upgrade to python3 and php8
Browse files Browse the repository at this point in the history
  • Loading branch information
geek-at committed Nov 19, 2023
1 parent 9a2f0e1 commit 02b4167
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions docker/Dockerfile
@@ -1,8 +1,9 @@
FROM alpine:3.14.2
FROM alpine:3.18

LABEL org.opencontainers.image.source = "https://github.com/HaschekSolutions/opentrashmail"

RUN apk add --no-cache bash python2 socat wget php7-fileinfo php7-session curl git php php-curl nginx php-openssl php-mbstring php-json php-gd php-dom php-fpm
RUN apk add --no-cache bash python3 py3-pip socat wget php-fileinfo php-session curl git php php-curl nginx php-openssl php-mbstring php-json php-gd php-dom php-fpm
RUN pip3 install aiosmtpd
#RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer
RUN mkdir -p /var/www/opentrashmail
WORKDIR /var/www/opentrashmail
Expand All @@ -16,7 +17,7 @@ RUN chmod +x /etc/start.sh
ADD docker/rootfs/nginx.conf /etc/nginx/http.d/default.conf
RUN mkdir -p /run/nginx
RUN mkdir -p /var/log/nginx
RUN sed -i 's/nobody/nginx/g' /etc/php7/php-fpm.d/www.conf
RUN sed -i 's/nobody/nginx/g' /etc/php81/php-fpm.d/www.conf

WORKDIR /var/www/opentrashmail

Expand Down
4 changes: 2 additions & 2 deletions docker/rootfs/start.sh
Expand Up @@ -5,7 +5,7 @@ echo 'Starting Open Trashmail'
cd /var/www/opentrashmail

echo ' [+] Starting php'
php-fpm7
php-fpm81

if [[ ${SKIP_FILEPERMISSIONS:=false} != true ]]; then
chown -R nginx:nginx /var/www/
Expand Down Expand Up @@ -48,4 +48,4 @@ _buildConfig() {
_buildConfig > /var/www/opentrashmail/config.ini

echo ' [+] Starting Mailserver'
su - nginx -s /bin/ash -c 'cd /var/www/opentrashmail/python;python -u mailserver.py >> /var/www/opentrashmail/logs/mailserver.log 2>&1 '
su - nginx -s /bin/ash -c 'cd /var/www/opentrashmail/python;python3 -u mailserver3.py >> /var/www/opentrashmail/logs/mailserver.log 2>&1 '

0 comments on commit 02b4167

Please sign in to comment.