Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 2.21.1

### Changes

* Use python3 throughout (v3.5)
* Update to version 2.21.1

## 2.18.3

### Changes
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

NAME = madharjan/docker-nginx-web2py
VERSION = 2.18.3
VERSION = 2.21.1

DEBUG ?= true

Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Docker container for Nginx with Web2py based on [madharjan/docker-nginx](https:/
* Minimal (for production deploy) version of container `docker-nginx-web2py-min` for Web2py without `admin`, `example` and `welcome`
* Bats [bats-core/bats-core](https://github.com/bats-core/bats-core) based test cases

## Nginx 1.10.3 & Web2py 2.18.3 (docker-nginx-web2py)
## Nginx 1.10.3 & Web2py 2.21.1 (docker-nginx-web2py)

### Environment

Expand Down Expand Up @@ -60,7 +60,7 @@ docker run -d \
-v /opt/docker/web2py/applications:/opt/web2py/applications \
-v /opt/docker/web2py/log:/var/log/nginx \
--name web2py \
madharjan/docker-nginx-web2py:2.18.5
madharjan/docker-nginx-web2py:2.21.1

# run container
# Web2py Minimal
Expand All @@ -70,7 +70,7 @@ docker run -d \
-v /opt/docker/web2py/applications:/opt/web2py/applications \
-v /opt/docker/web2py/log:/var/log/nginx \
--name web2py \
madharjan/docker-nginx-web2py-min:2.18.5
madharjan/docker-nginx-web2py-min:2.21.1
```

## Systemd Unit File
Expand All @@ -90,15 +90,15 @@ ExecStartPre=-/bin/mkdir -p /opt/docker/web2py/applications
ExecStartPre=-/bin/mkdir -p /opt/docker/web2py/log
ExecStartPre=-/usr/bin/docker stop web2py
ExecStartPre=-/usr/bin/docker rm web2py
ExecStartPre=-/usr/bin/docker pull madharjan/docker-nginx-web2py:2.18.5
ExecStartPre=-/usr/bin/docker pull madharjan/docker-nginx-web2py:2.21.1

ExecStart=/usr/bin/docker run \
-e WEB2PY_ADMIN=Pa55w0rd \
-p 80:80 \
-v /opt/docker/web2py/applications:/opt/web2py/applications \
-v /opt/docker/web2py/log:/var/log/nginx \
--name web2py \
madharjan/docker-nginx-web2py:2.18.5
madharjan/docker-nginx-web2py:2.21.1

ExecStop=/usr/bin/docker stop -t 2 web2py

Expand Down Expand Up @@ -127,13 +127,13 @@ WantedBy=multi-user.target
docker run --rm \
-e PORT=80 \
-e VOLUME_HOME=/opt/docker \
-e VERSION=2.18.5 \
-e VERSION=2.21.1 \
-e WEB2PY_ADMIN=Pa55w0rd \
-e WEB2PY_MIN=false \
-e INSTALL_PROJECT=1 \
-e PROJECT_GIT_REPO=https://github.com/madharjan/web2py-contest.git \
-e PROJECT_GIT_TAG=HEAD \
madharjan/docker-nginx-web2py-min:2.18.5 \
madharjan/docker-nginx-web2py-min:2.21.1 \
web2py-systemd-unit | \
sudo tee /etc/systemd/system/web2py.service

Expand Down
2 changes: 1 addition & 1 deletion bin/web2py-setpass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env python
#!/usr/bin/env python3

import sys
from gluon.main import save_password;
Expand Down
2 changes: 1 addition & 1 deletion bin/web2py-systemd-unit
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ if [ "${DEBUG}" = true ]; then
set -x
fi

VERSION=2.18.3
VERSION=2.21.1

DEF_PORT=80
DEF_VOLUME_HOME=/opt/docker
Expand Down
4 changes: 2 additions & 2 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,14 @@ pip install gitpython
## Install Web2py
mkdir -p /opt/tmp
cd /opt/tmp
git clone https://github.com/web2py/web2py.git --depth 1 --branch R-2.18.3 --single-branch web2py
git clone https://github.com/web2py/web2py.git --depth 1 --branch v2.21.1 --single-branch web2py
cd web2py
git submodule update --init --recursive
cd ../../

if [ "${WEB2PY_MIN}" == true ]; then
cd tmp/web2py
python scripts/make_min_web2py.py ../../tmp/web2py-min
python3 scripts/make_min_web2py.py ../../tmp/web2py-min
mv ../../tmp/web2py-min ../../web2py
cd ../../
else
Expand Down
2 changes: 1 addition & 1 deletion services/uwsgi/uwsgi.ini
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ reload-on-rss = 192
uid = www-data
gid = www-data
touch-reload = /opt/web2py/routes.py
cron = 0 0 -1 -1 -1 python /opt/web2py/web2py.py -Q -S welcome -M -R scripts/sessions2trash.py -A -o
cron = 0 0 -1 -1 -1 python3 /opt/web2py/web2py.py -Q -S welcome -M -R scripts/sessions2trash.py -A -o
no-orphans = true
11 changes: 6 additions & 5 deletions services/uwsgi/uwsgi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ fi

UWSGI_BUILD_PATH=/build/services/uwsgi

## Install Nginx.
## Install uwsgi.
apt-get install -y --no-install-recommends \
build-essential \
libxml2-dev \
python-dev \
python-pip \
python3-dev \
python3-pip \
unzip \
rsync

pip install setuptools --upgrade
PIPPATH=`which pip`
PIPPATH=`which pip3`
$PIPPATH install --upgrade "pip < 21.0"
$PIPPATH install setuptools --upgrade
$PIPPATH install wheel
$PIPPATH install --upgrade uwsgi

Expand Down