Skip to content

Scalable domserver #130

@arasHi87

Description

@arasHi87

Cause I deploy domserver in k8s, so I need to let domserver to be scaleable, but I can't find relevant information on the Internet, so I leave my solution here for someone who need this (all we need just to modify the official Dockerfile).

Install dependency

# Install required packages for running of domserver
RUN apt update \
    && apt install --no-install-recommends --no-install-suggests -y \
    acl curl zip unzip supervisor mariadb-client apache2-utils \
    nginx php-cli php-fpm php-zip \
    php-gd php-curl php-mysql php-json php-intl \
    php-gmp php-xml php-mbstring php-ldap php-pear php-dev \
    enscript lpr make libzstd-dev \
    ca-certificates python3-yaml \
    && rm -rf /var/lib/apt/lists/*

Install php-ext

RUN yes | pecl install zstd igbinary redis

Set php-ini

RUN sed -i 's/;session.save_path/session.save_path/g' /etc/php/7.4/fpm/php.ini && \
    sed -i 's/\/var\/lib\/php\/sessions/tcp:\/\/domjudge-redis:6379/g' /etc/php/7.4/fpm/php.ini && \ 
    sed -i 's/= files/= redis/g' /etc/php/7.4/fpm/php.ini && \
    sed -i '938i\extension=zsdt.so' /etc/php/7.4/fpm/php.ini && \
    sed -i '938i\extension=igbinary.so' /etc/php/7.4/fpm/php.ini && \
    sed -i '938i\extension=redis.so' /etc/php/7.4/fpm/php.ini && \
    service php7.4-fpm restart

Done

And remember to change the redis host to yourself, hope this can helps guy!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions