mirror of
https://github.com/wallabag/docker.git
synced 2025-12-22 03:38:32 +01:00
added db migration part to the docs
This commit is contained in:
@ -70,6 +70,14 @@ $ docker run -p 6379:6379 redis:alpine redis
|
|||||||
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
|
$ 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
|
## docker-compose
|
||||||
|
|
||||||
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
|
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
|
||||||
|
|||||||
@ -122,12 +122,6 @@
|
|||||||
chdir: /var/www/wallabag
|
chdir: /var/www/wallabag
|
||||||
notify: chown dir
|
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
|
- name: chown dir
|
||||||
file:
|
file:
|
||||||
path=/var/www/wallabag
|
path=/var/www/wallabag
|
||||||
|
|||||||
Reference in New Issue
Block a user