Skip to content
Browse files

Merge branch 'feature-s/3698-persistent-web2py-password' into 'dev'

Feature s/3698 persistent web2py password

Closes #3698

See merge request vidjil/vidjil!548
  • Loading branch information
mikael-s committed Nov 27, 2019
2 parents c6140f5 + 633da06 commit a8edddc85b81fb7c6f17844c1eef428d6167d7cf
@@ -177,7 +177,7 @@ forget to make a backup of any file you replace.)
## First configuration and first launch

- Set the SSL certificates (see above)
- Change the mysql root password in `docker-compose.yml`
- Change the mysql root password and the web2py admin password in `docker-compose.yml`
- Change the mysql vidjil password in `mysql/create_db.sql` and sets it also in `DB_ADDRESS` in `vidjil-server/conf/`

- Comment backup/reporter services in `docker-compose.yml`
@@ -309,6 +309,20 @@ cd /usr/share/vidjil/server
sh vidjil /mnt/backup >> /var/log/cron.log 2>&1

## I can't connect to the web2py administration site
The URL to this site is https://mywebsite/admin/default/.
The password should be given in the `docker-compose.yml` file.
Otherwise a random password is generated. You can still modify
this password by connecting to the server (in the `uwsgi` container).
Go in the the `/usr/share/vidjil/server/web2py` directory and then
launch Python.
from gluon.main import save_password
save_password(PASSWORD, 443)
This password will not persist when the container will be restarted.
For a persistent password, please use the environment variable.

# Docker -- Updating a Docker installation

## Before the update
@@ -3,6 +3,9 @@ This CHANGELOG concerns the Docker images of vidjil.
We publish here notes to help to update these images.
See <>

- The web2py password is now provided through an environment
variable in the docker-compos.yml file.
- Tag initialization while creating the database
@@ -9,6 +9,8 @@ services:
- /opt/vidjil/mysql:/var/lib/mysql
image: vidjil/server:latest
command: bash /entrypoints/
- fuse
@@ -30,6 +32,7 @@ services:
- /opt/vidjil/log/uwsgi:/var/log/uwsgi
- /opt/vidjil/backup:/mnt/backup
- ./vidjil-server/conf:/etc/vidjil
- ./vidjil-server/scripts:/entrypoints
- ../germline:/usr/share/vidjil/germline
image: vidjil/client:latest
@@ -44,6 +44,6 @@ copy ./scripts/ /entrypoints/
run mkdir /usr/share/vidjil/server/web2py/applications/vidjil/databases && touch /usr/share/vidjil/server/web2py/applications/vidjil/databases/sql.log
run mkdir /var/vidjil
run touch /var/vidjil/vidjil.log && touch /var/vidjil/vidjil-debug.log
run cd /usr/share/vidjil/server/web2py && python -c "from gluon.main import save_password; save_password('default',443)"
run PASSWORD=`openssl rand -base64 10` && cd /usr/share/vidjil/server/web2py && python -c "from gluon.main import save_password; save_password('${PASSWORD}',443)"
run chown -R www-data:www-data /usr/share/vidjil
run useradd -ms /bin/bash vidjil && usermod -aG sudo vidjil
@@ -8,4 +8,10 @@ else
chown -R $user /var/vidjil/vidjil*
chown -R $user /usr/share/vidjil/server/web2py/applications/vidjil/databases

if [[ -n "$WEB2PY_ADMIN_PASSWORD" ]]; then
cd /usr/share/vidjil/server/web2py
python -c "from gluon.main import save_password; save_password('${WEB2PY_ADMIN_PASSWORD}', 443)"

/usr/local/bin/gosu $user /usr/bin/uwsgi --ini /etc/uwsgi/apps-enabled/web2py.ini

0 comments on commit a8edddc

Please sign in to comment.
You can’t perform that action at this time.