mirror of
https://github.com/wallabag/docker
synced 2025-12-13 09:46:27 +00:00
Version bumb to 2.2.1 and added migrate command
made the changes to get 2.2.1 running plus added a migrate command to the entrypoint. documented it in the readme.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
FROM alpine:edge
|
||||
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
|
||||
|
||||
ENV WALLABAG_VERSION=2.1.6 \
|
||||
POSTGRES_USER=postgres
|
||||
ARG WALLABAG_VERSION=2.2.1
|
||||
ARG POSTGRES_USER=postgres
|
||||
|
||||
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
||||
&& apk add --update \
|
||||
|
||||
12
README.md
12
README.md
@@ -72,12 +72,18 @@ $ docker run -p 6379:6379 --name redis redis:alpine
|
||||
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
|
||||
```
|
||||
|
||||
## DB migration
|
||||
## Upgrading
|
||||
|
||||
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.
|
||||
If there is a version upgrade that needs a database migration. The most easy way to do is running the `migrate` command:
|
||||
|
||||
```
|
||||
$ docker exec -t wallabag /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
|
||||
$ docker run --link wallabag-db:wallabag-db -e <... your config variables here ...> wallabag/wallabag migrate
|
||||
```
|
||||
|
||||
Or you can start the container with the new image and run the migration command manually:
|
||||
|
||||
```
|
||||
$ docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/console doctrine:migrations:migrate --env=prod --no-interaction
|
||||
```
|
||||
|
||||
## docker-compose
|
||||
|
||||
@@ -9,5 +9,10 @@ if [ "$1" = "import" ];then
|
||||
cd /var/www/wallabag/
|
||||
exec su -c "bin/console wallabag:import:redis-worker -e=prod $2 -vv" -s /bin/sh nobody
|
||||
fi
|
||||
if [ "$1" = "migrate" ];then
|
||||
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
|
||||
cd /var/www/wallabag/
|
||||
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
|
||||
fi
|
||||
|
||||
exec "$@"
|
||||
|
||||
@@ -61,8 +61,6 @@
|
||||
port="{{ database_port }}"
|
||||
when: (database_driver == 'pdo_mysql') or
|
||||
(database_driver == 'pdo_pgsql')
|
||||
tags:
|
||||
- firstrun
|
||||
|
||||
- name: add mariadb db
|
||||
mysql_db:
|
||||
|
||||
@@ -8,6 +8,7 @@ parameters:
|
||||
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||
database_table_prefix: wallabag_
|
||||
database_socket: null
|
||||
database_charset: utf8
|
||||
|
||||
mailer_transport: smtp
|
||||
mailer_host: {{ mailer_host }}
|
||||
@@ -36,9 +37,14 @@ parameters:
|
||||
rabbitmq_port: 5672
|
||||
rabbitmq_user: guest
|
||||
rabbitmq_password: guest
|
||||
rabbitmq_prefetch_count: 10
|
||||
|
||||
# Redis processing
|
||||
redis_scheme: tcp
|
||||
redis_host: redis
|
||||
redis_port: 6379
|
||||
redis_path: null
|
||||
redis_password: null
|
||||
|
||||
# sites credentials
|
||||
sites_credentials: {}
|
||||
|
||||
@@ -8,6 +8,7 @@ parameters:
|
||||
database_path: "%kernel.root_dir%/../data/db/wallabag.sqlite"
|
||||
database_table_prefix: wallabag_
|
||||
database_socket: null
|
||||
database_charset: utf8
|
||||
|
||||
test_database_driver: pdo_sqlite
|
||||
test_database_host: 127.0.0.1
|
||||
@@ -44,9 +45,14 @@ parameters:
|
||||
rabbitmq_port: 5672
|
||||
rabbitmq_user: guest
|
||||
rabbitmq_password: guest
|
||||
rabbitmq_prefetch_count: 10
|
||||
|
||||
# Redis processing
|
||||
redis_scheme: tcp
|
||||
redis_host: localhost
|
||||
redis_port: 6379
|
||||
redis_path: null
|
||||
redis_password: null
|
||||
|
||||
# sites credentials
|
||||
sites_credentials: {}
|
||||
|
||||
Reference in New Issue
Block a user