forked from DOMjudge/domjudge-packaging
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
13 changed files
with
98 additions
and
108 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ARG ARCH= | ||
FROM "${ARCH}ubuntu:focal" | ||
FROM "${ARCH}ubuntu:jammy" | ||
LABEL maintainer="DOMjudge team <[email protected]>" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive \ | ||
|
@@ -21,9 +21,9 @@ RUN apt update \ | |
&& apt install --no-install-recommends --no-install-suggests -y \ | ||
dumb-init autoconf automake git acl \ | ||
gcc g++ make zip unzip mariadb-client \ | ||
nginx php7.4 php7.4-cli php7.4-fpm php7.4-zip \ | ||
php7.4-gd php7.4-curl php7.4-mysql php7.4-json php7.4-intl \ | ||
php7.4-gmp php7.4-xml php7.4-mbstring php7.4-xdebug php7.4-pcov \ | ||
nginx php8.1 php8.1-cli php8.1-fpm php8.1-zip \ | ||
php8.1-gd php8.1-curl php8.1-mysql php8.1-intl \ | ||
php8.1-gmp php8.1-xml php8.1-mbstring php8.1-xdebug php8.1-pcov \ | ||
bsdmainutils ntp \ | ||
linuxdoc-tools linuxdoc-tools-text groff \ | ||
python3-sphinx python3-sphinx-rtd-theme python3-pip fontconfig python3-yaml \ | ||
|
@@ -34,12 +34,9 @@ RUN apt update \ | |
supervisor apache2-utils lsb-release \ | ||
libcurl4-gnutls-dev libjsoncpp-dev libmagic-dev \ | ||
enscript lpr ca-certificates less vim \ | ||
php-pear php-dev software-properties-common \ | ||
php-pear php-dev software-properties-common python3-pygments rst2pdf gpg-agent tex-gyre \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Needed for building the docs | ||
RUN pip3 install pygments && pip3 install rst2pdf | ||
|
||
# Forward nginx request and error logs to standard output/error. Also create directory for PHP-FPM socket | ||
RUN ln -sf /dev/stdout /var/log/nginx/access.log \ | ||
&& ln -sf /dev/stderr /var/log/nginx/error.log \ | ||
|
@@ -60,15 +57,15 @@ RUN apt update && \ | |
# Install all supported PHP versions | ||
RUN add-apt-repository ppa:ondrej/php -y && apt update | ||
RUN for VERSION in $PHPSUPPORTED; do \ | ||
if [ "${VERSION}" != "7.4" ]; then \ | ||
if [ "${VERSION}" != "8.1" ]; then \ | ||
$APTINSTALL php${VERSION}; \ | ||
fi; \ | ||
done | ||
RUN PACKAGES=$(dpkg-query -f '${binary:Package}\n' -W|grep "^php.*-"); \ | ||
for PACKAGE in $PACKAGES; do \ | ||
PACKAGEALLVERSIONS="" && \ | ||
for VERSION in $PHPSUPPORTED; do \ | ||
if [ "${VERSION}" != "7.4" ]; then \ | ||
if [ "${VERSION}" != "8.1" ]; then \ | ||
PACKAGEALLVERSIONS="$PACKAGEALLVERSIONS php${VERSION}-${PACKAGE#php*-}"; \ | ||
fi; \ | ||
done; \ | ||
|
@@ -83,11 +80,6 @@ RUN for VERSION in $PHPSUPPORTED; do \ | |
done | ||
RUN update-alternatives --set php-fpm /usr/sbin/php-fpm${DEFAULTPHPVERSION} | ||
|
||
# Add exposed volume | ||
VOLUME ["/domjudge"] | ||
|
||
WORKDIR /domjudge | ||
|
||
# Add PHP configuration | ||
RUN mkdir /php-config | ||
COPY ["php-config", "/php-config"] | ||
|
@@ -114,5 +106,7 @@ COPY ["supervisor", "/etc/supervisor/conf.d/"] | |
COPY ["sudoers-domjudge", "/etc/sudoers.d/domjudge"] | ||
RUN chmod 440 /etc/sudoers.d/domjudge | ||
|
||
USER domjudge | ||
|
||
# Expose HTTP port | ||
EXPOSE 80 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
xdebug.remote_autostart=1 | ||
xdebug.remote_enable=1 | ||
xdebug.remote_host=host.docker.internal | ||
xdebug.idekey=IDE | ||
xdebug.mode=develop,debug | ||
xdebug.client_host=host.docker.internal | ||
xdebug.start_with_request=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,6 @@ then | |
fi | ||
|
||
for id in `seq 2 3`; do | ||
supervisorctl $1 judgedaemon$id | ||
sudo supervisorctl $1 judgedaemon$id | ||
done | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
#!/bin/bash | ||
if [[ -d /domjudge/webapp/var/log ]] | ||
if [ -z "$PROJECT_DIR" ] | ||
then | ||
tail -F /domjudge/webapp/var/log/dev.log | ||
PROJECT_DIR=/domjudge | ||
fi | ||
|
||
if [[ -d "${PROJECT_DIR}/webapp/var/log" ]] | ||
then | ||
tail -F "${PROJECT_DIR}/webapp/var/log/dev.log" | ||
else | ||
tail -F /domjudge/webapp/var/logs/dev.log | ||
tail -F "${PROJECT_DIR}/webapp/var/logs/dev.log" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
phpdismod xdebug | ||
supervisorctl restart php | ||
sudo phpdismod xdebug | ||
sudo supervisorctl restart php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
phpenmod xdebug | ||
supervisorctl restart php | ||
sudo phpenmod xdebug | ||
sudo supervisorctl restart php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
[program:judgedaemon] | ||
process_name=judgedaemon%(process_num)s | ||
numprocs=2 | ||
command=/domjudge/bin/judgedaemon -n %(process_num)s | ||
command=PROJECT_DIR/bin/judgedaemon -n %(process_num)s | ||
user=domjudge | ||
autostart=true | ||
autorestart=true |
Oops, something went wrong.