Skip to content

Can you update please #2

@hesa2020

Description

@hesa2020

Hello, can you update it to the latest openlitespeed version and create a branch/tag for php 8 please.

I tried doing it but i kept getting permissions error, I forced executing the entrypoint as lsadm using:
USER lsadm
CMD "/entrypoint.sh"

It fixed the error:

[ERROR] [63] Failed to open the real time report: ./.rtreport.2!

However the server kept restarting every few seconds and I dont know why

Here is the docker file giving me the permission error:

# Debian 10 base
FROM bitnami/minideb:buster

ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE="1"
ENV DEBIAN_FRONTEND="noninteractive"

# HTTP port
EXPOSE "80/tcp"

# Webadmin port (HTTPS)
EXPOSE "7080/tcp"

ENV ADMIN_PASSWORD="IfNotSet!"

# Install the entrypoint script
COPY "entrypoint.sh" "/entrypoint.sh"
RUN chmod "u=rwx,go=" "/entrypoint.sh"

# Make sure we have required tools
RUN install_packages \
	"curl" \
	"gnupg" \
	"git" \
	"zip"

# Install the Litespeed keys
RUN curl --silent --show-error \
	"http://rpms.litespeedtech.com/debian/lst_debian_repo.gpg" |\
	apt-key add -

RUN curl --silent --show-error \
	"http://rpms.litespeedtech.com/debian/lst_repo.gpg" |\
	apt-key add -

# Install the Litespeed repository
RUN \
	echo "deb http://rpms.litespeedtech.com/debian/ buster main" > "/etc/apt/sources.list.d/openlitespeed.list"

# Install the Litespeed
RUN install_packages \
	"openlitespeed" && \
	echo "cloud-docker" > "/usr/local/lsws/PLAT"

# Install PageSpeed module
RUN install_packages \
	"ols-pagespeed"

# Install the PHP
RUN install_packages \
	"lsphp80"

# Install PHP modules
RUN install_packages \
	"lsphp80-apcu" \
	"lsphp80-common" \
	"lsphp80-curl" \
	"lsphp80-igbinary" \
	"lsphp80-imagick" \
	"lsphp80-imap" \
	"lsphp80-intl" \
	"lsphp80-ldap" \
	"lsphp80-memcached" \
	"lsphp80-msgpack" \
	"lsphp80-mysql" \
	"lsphp80-opcache" \
	"lsphp80-pear" \
	"lsphp80-pgsql" \
	"lsphp80-pspell" \
	"lsphp80-sqlite3" \
	"lsphp80-tidy"

# Set the default PHP CLI
RUN ln --symbolic --force \
	"/usr/local/lsws/lsphp80/bin/lsphp" \
	"/usr/local/lsws/fcgi-bin/lsphp5"

RUN ln --symbolic --force \
	"/usr/local/lsws/lsphp80/bin/php8.0" \
	"/usr/bin/php"

# Install the certificates
RUN install_packages \
	"ca-certificates"

# Install requirements
RUN install_packages \
	"procps" \
	"tzdata"

# Clean up
RUN rm -rf "/tmp/*"
RUN rm -rf "/var/log/litespeed"

# Create the directories
RUN mkdir --parents \
	"/tmp/lshttpd/gzcache" \
	"/tmp/lshttpd/pagespeed" \
	"/tmp/lshttpd/stats" \
	"/tmp/lshttpd/swap" \
	"/tmp/lshttpd/upload" \
	"/var/log/litespeed"

# Make sure logfiles exist
RUN touch \
	"/var/log/litespeed/server.log" \
	"/var/log/litespeed/access.log" \
	"/var/log/litespeed/container-error.log" \
	"/var/log/litespeed/container-access.log"

# Make sure we have access to files
RUN chown --recursive "lsadm:lsadm" \
	"/tmp/lshttpd" \
	"/var/log/litespeed" 

# Configure the admin interface
COPY --chown="lsadm:lsadm" \
	"config/admin_config.conf" \
	"/usr/local/lsws/admin/conf/admin_config.conf"

# Configure the server
COPY --chown="lsadm:lsadm" \
	"config/httpd_config.conf" \
	"/usr/local/lsws/conf/httpd_config.conf"

# Create the virtual host folders
RUN mkdir --parents \
	"/usr/local/lsws/conf/vhosts/container" \
	"/var/www/container" \
	"/var/www/container/web" \
	"/var/www/container/tmp"

# Configure the virtual host
COPY --chown="lsadm:lsadm" \
	"config/vhconf.conf" \
	"/usr/local/lsws/conf/vhosts/container/vhconf.conf"

# Set up the virtual host configuration permissions
RUN chown --recursive "lsadm:lsadm" \
	"/usr/local/lsws/conf/vhosts/container"

# Set up the virtual host document root permissions
RUN chown --recursive "www-data:www-data" \
	"/var/www/container"

RUN chown "www-data:www-data" \
	"/var/www"

# Setup the health checking
HEALTHCHECK \
	--start-period=15s \
	--interval=1m \
	--timeout=3s \
	--retries=3 \
	CMD /usr/local/lsws/bin/lswsctrl 'status' | grep -Ee '^litespeed is running with PID [0-9]+.$'

# Define the volumes used
 VOLUME "/tmp/lshttpd" "/var/log/litespeed"

# Set the workdir and command
ENV PATH="/usr/local/lsws/bin:${PATH}"
WORKDIR "/var/www/container"
STOPSIGNAL SIGTERM
CMD "/entrypoint.sh"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions