From 1e099212d4625b27a5b61a5b07d69b802436eae9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Jacquet?= Date: Sun, 22 Sep 2019 21:49:31 +0200 Subject: [PATCH] Update 2019 version 5.2 --- Dockerfile | 22 ++++++++++------------ LICENSE | 2 +- README.md | 6 ++++-- conf/config.inc.php | 1 + docker-compose.yml | 5 +++-- 5 files changed, 19 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6aaacfb..4c4f5b4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,33 +2,31 @@ # https://www.rosariosis.org/ # Best Dockerfile practices: http://crosbymichael.com/dockerfile-best-practices.html -FROM php:7.0-apache +# https://hub.docker.com/_/php?tab=tags&page=1&name=apache +FROM php:7.3-apache LABEL maintainer="François Jacquet " -ENV PGHOST=rosariosisdb \ - PGUSER=postgres \ - PGPASSWORD=postgres \ - PGDATABASE=postgres \ +ENV PGHOST=db \ + PGUSER=rosario \ + PGPASSWORD=rosariopwd \ + PGDATABASE=rosariosis \ PGPORT=5432 \ - ROSARIOSIS_YEAR=2018 \ + ROSARIOSIS_YEAR=2019 \ ROSARIOSIS_LANG='en_US' -# Fix #1 Build failing: Errors were encountered while processing: postgresql-client-9.6. -RUN mkdir -p /usr/share/man/man1 && \ - mkdir -p /usr/share/man/man7; - # Upgrade packages. # Install git, Apache2 + PHP + PostgreSQL webserver, sendmail, wkhtmltopdf & others utilities. RUN apt-get update && \ apt-get upgrade -y && \ apt-get install postgresql-client wkhtmltopdf libpq-dev libpng-dev libxml2-dev sendmail -y; +# Install PHP extensions. RUN docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \ docker-php-ext-install -j$(nproc) gd mbstring xml pgsql gettext xmlrpc # Download and extract rosariosis -ENV ROSARIOSIS_VERSION 'v4.7.1' +ENV ROSARIOSIS_VERSION 'v5.2' RUN mkdir /usr/src/rosariosis && \ curl -L https://gitlab.com/francoisjacquet/rosariosis/-/archive/${ROSARIOSIS_VERSION}/rosariosis-${ROSARIOSIS_VERSION}.tar.gz \ | tar xz --strip-components=1 -C /usr/src/rosariosis && \ @@ -36,7 +34,7 @@ RUN mkdir /usr/src/rosariosis && \ ln -s /usr/src/rosariosis/ /var/www/html && chmod 777 /var/www/html &&\ chown -R www-data:www-data /usr/src/rosariosis -# Copy our custom RosarioSIS configuration file. +# Copy our configuration files. COPY conf/config.inc.php /usr/src/rosariosis/config.inc.php COPY conf/.htaccess /usr/src/rosariosis/.htaccess COPY bin/init /init diff --git a/LICENSE b/LICENSE index a73b450..c46e800 100644 --- a/LICENSE +++ b/LICENSE @@ -1,7 +1,7 @@ The MIT License (MIT) Copyright (c) 2015 Larry Price, John Plevyak -Copyright (c) 2016 François Jacquet +Copyright (c) 2016-2019 François Jacquet Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index b81138f..b6b3dbc 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,11 @@ $ docker run --name rosariosisdb -d postgres:9.5 $ docker run -e "ROSARIOSIS_ADMIN_EMAIL=admin@example.com" -h `hostname -f` -d -p 80:80 --name rosariosis --link rosariosisdb:rosariosisdb rosariosis ``` -Port 80 will be exposed, so you can visit `localhost` to get started. The default username is `admin` and the default password is `admin`. +Port 80 will be exposed, so you can visit `localhost/InstallDatabase.php` to get started. Default username and password: `admin`. -## Enviroment Variables +Note: a `docker-compose.yml` file is available. + +## Environment Variables The RosarioSIS image uses several environment variables which are easy to miss. While none of the variables are required, they may significantly aid you in using the image. diff --git a/conf/config.inc.php b/conf/config.inc.php index 4d3a2bd..25140ee 100644 --- a/conf/config.inc.php +++ b/conf/config.inc.php @@ -73,6 +73,7 @@ $DefaultSyear = getenv( 'ROSARIOSIS_YEAR' ); * Leave empty to not receive email notifications */ $RosarioNotifyAddress = getenv( 'ROSARIOSIS_ADMIN_EMAIL' ); +$RosarioErrorsAddress = getenv( 'ROSARIOSIS_ADMIN_EMAIL' ); /** diff --git a/docker-compose.yml b/docker-compose.yml index 6aab5e8..1bf9424 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,9 +1,10 @@ +# https://riptutorial.com/docker-compose version: '3.1' services: db: - image: sameersbn/postgresql:9.5 + image: sameersbn/postgresql environment: POSTGRES_PASSWORD: example DB_USER: rosario @@ -21,5 +22,5 @@ services: PGUSER: rosario PGPASSWORD: rosariopwd PGDATABASE: rosariosis - ROSARIOSIS_YEAR: 2018 + ROSARIOSIS_YEAR: 2019 # ROSARIOSIS_LANG: 'es_ES'