From 1f4d9af3168e6a9461e4635765e695d8a3548c1e Mon Sep 17 00:00:00 2001 From: Marvin Steadfast Date: Tue, 11 Oct 2016 16:18:33 +0200 Subject: [PATCH] added db migration part to the docs --- README.md | 8 ++++++++ root/etc/ansible/entrypoint.yml | 6 ------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2a77c25..3dc64c7 100644 --- a/README.md +++ b/README.md @@ -70,6 +70,14 @@ $ docker run -p 6379:6379 redis:alpine redis $ docker run -p 80:80 --link redis:redis wallabag/wallabag ``` +## DB migration + +If there is a version upgrade that needs a database migration, you should start the container with the new image and run the migration command. + +``` +$ docker exec -t wallabag /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction +``` + ## docker-compose It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example: diff --git a/root/etc/ansible/entrypoint.yml b/root/etc/ansible/entrypoint.yml index 654cbeb..bec63f1 100644 --- a/root/etc/ansible/entrypoint.yml +++ b/root/etc/ansible/entrypoint.yml @@ -122,12 +122,6 @@ chdir: /var/www/wallabag notify: chown dir - - name: run migration - shell: php bin/console doctrine:migrations:migrate --env=prod - args: - chdir: /var/www/wallabag - notify: chown dir - - name: chown dir file: path=/var/www/wallabag