Skip to content

Commit

Permalink
- Changed docker file to use more recent software, base ubuntu 20.04.
Browse files Browse the repository at this point in the history
- uid and gid of www-data can now be set via environment variables: WWWDATA_UID, WWWDATA_GID
  • Loading branch information
mauvilsa committed Oct 8, 2020
1 parent cdd874f commit 724d901
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM library/ubuntu:16.04
FROM ubuntu:20.04

MAINTAINER Mauricio Villegas <mauricio_ville@yahoo.com>
LABEL maintainer="Mauricio Villegas <mauricio_ville@yahoo.com>"

### Install pre-requisites ###
RUN apt-get update --fix-missing \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

nw-page-editor - Simple app for visual editing of Page XML files.

Version: 2020.10.02
Version: 2020.10.08


# Description
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nw-page-editor",
"version": "2020.10.02",
"version": "2020.10.08",
"description": "Simple app for visual editing of Page XML files",
"main": "./html/index.html#1",
"author": "Mauricio Villegas <mauricio_ville@yahoo.com>",
Expand Down
4 changes: 2 additions & 2 deletions web-app/common.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
/**
* Common code to be executed by other php scripts.
*
* @version $Version: 2020.10.02$
* @version $Version: 2020.10.08$
* @author Mauricio Villegas <mauricio_ville@yahoo.com>
* @copyright Copyright(c) 2017-present, Mauricio Villegas <mauricio_ville@yahoo.com>
* @license MIT License
*/

$version = str_replace('Version: ','',"Version: 2020.10.02");
$version = str_replace('Version: ','',"Version: 2020.10.08");
$v = '?v='.$version;

/// User authentication ///
Expand Down
14 changes: 8 additions & 6 deletions web-app/start-server.sh
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#!/bin/bash

##
## @version $Version: 2017.09.24$
## @version $Version: 2020.10.08$
## @author Mauricio Villegas <mauricio_ville@yahoo.com>
## @copyright Copyright(c) 2016-present, Mauricio Villegas <mauricio_ville@yahoo.com>
## @license MIT License
##

### Change user and group IDs of www-data to that of /var/www/nw-page-editor/data directory ###
usermod -u $(stat -c %u /var/www/nw-page-editor/data) www-data;
groupmod -g $(stat -c %g /var/www/nw-page-editor/data) www-data;
## Change user and group IDs of www-data to that of /var/www/nw-page-editor/data directory ##
[ "$WWWDATA_UID" = "" ] && WWWDATA_UID=$(stat -c %u /var/www/nw-page-editor/data);
[ "$WWWDATA_GID" = "" ] && WWWDATA_GID=$(stat -c %g /var/www/nw-page-editor/data);
usermod -u $WWWDATA_UID www-data;
groupmod -g $WWWDATA_GID www-data;
chown :www-data /var/www/nw-page-editor/app;
chmod g+w /var/www/nw-page-editor/app;

### Start the git commit daemon ###
## Start the git commit daemon ##
if [ -d "/var/www/nw-page-editor/data/.git" ]; then
cd /var/www/nw-page-editor/data;
export HOME="/var/www";
Expand All @@ -34,5 +36,5 @@ if [ -d "/var/www/nw-page-editor/data/.git" ]; then
fi
fi

### Start apache server ###
## Start apache server ##
apachectl -D FOREGROUND;

0 comments on commit 724d901

Please sign in to comment.