mirror of
https://github.com/wallabag/docker
synced 2025-12-16 03:06:34 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6f22d1ef68 | ||
|
|
d1c050662b | ||
|
|
038a5ea6c7 | ||
|
|
c42058bf0f | ||
|
|
3e4cd35253 | ||
|
|
8c15693e12 | ||
|
|
f6e4816eb5 | ||
|
|
bff2dd3d8b |
76
Dockerfile
76
Dockerfile
@@ -1,61 +1,61 @@
|
|||||||
FROM alpine:edge
|
FROM alpine:edge
|
||||||
MAINTAINER Marvin Steadfast <marvin@xsteadfastx.org>
|
|
||||||
|
|
||||||
ARG WALLABAG_VERSION=2.2.1
|
LABEL maintainer "Marvin Steadfast <marvin@xsteadfastx.org>"
|
||||||
ARG POSTGRES_USER=postgres
|
|
||||||
|
|
||||||
RUN echo "@testing http://dl-4.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories \
|
ARG WALLABAG_VERSION=2.2.2
|
||||||
&& apk add --update \
|
|
||||||
|
RUN set -ex \
|
||||||
|
&& apk update \
|
||||||
|
&& apk upgrade --available \
|
||||||
|
&& apk add \
|
||||||
ansible \
|
ansible \
|
||||||
curl \
|
curl \
|
||||||
git \
|
git \
|
||||||
libwebp@testing \
|
libwebp \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
nginx \
|
nginx \
|
||||||
pcre \
|
pcre \
|
||||||
php7 \
|
php7 \
|
||||||
php7-amqp@testing \
|
php7-amqp \
|
||||||
php7-bcmath \
|
php7-bcmath \
|
||||||
php7-ctype@testing \
|
php7-ctype \
|
||||||
php7-curl@testing \
|
php7-curl \
|
||||||
php7-dom@testing \
|
php7-dom \
|
||||||
php7-fpm@testing \
|
php7-fpm \
|
||||||
php7-gd@testing \
|
php7-gd \
|
||||||
php7-gettext@testing \
|
php7-gettext \
|
||||||
php7-iconv@testing \
|
php7-iconv \
|
||||||
php7-json@testing \
|
php7-json \
|
||||||
php7-mbstring@testing \
|
php7-mbstring \
|
||||||
php7-openssl@testing \
|
php7-openssl \
|
||||||
php7-pdo_mysql@testing \
|
php7-pdo_mysql \
|
||||||
php7-pdo_pgsql@testing \
|
php7-pdo_pgsql \
|
||||||
php7-pdo_sqlite@testing \
|
php7-pdo_sqlite \
|
||||||
php7-phar@testing \
|
php7-phar \
|
||||||
php7-session@testing \
|
php7-session \
|
||||||
php7-xml@testing \
|
php7-simplexml \
|
||||||
php7-zlib@testing \
|
php7-tokenizer \
|
||||||
php7@testing\
|
php7-xml \
|
||||||
|
php7-zlib \
|
||||||
py-mysqldb \
|
py-mysqldb \
|
||||||
py-psycopg2 \
|
py-psycopg2 \
|
||||||
py-simplejson \
|
py-simplejson \
|
||||||
|
rabbitmq-c \
|
||||||
s6 \
|
s6 \
|
||||||
tar \
|
tar \
|
||||||
&& rm -rf /var/cache/apk/*
|
&& rm -rf /var/cache/apk/* \
|
||||||
|
|
||||||
RUN ln -s /usr/bin/php7 /usr/bin/php \
|
|
||||||
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
&& ln -sf /dev/stdout /var/log/nginx/access.log \
|
||||||
&& ln -sf /dev/stderr /var/log/nginx/error.log
|
&& ln -sf /dev/stderr /var/log/nginx/error.log \
|
||||||
|
&& curl -s http://getcomposer.org/installer | php \
|
||||||
RUN curl -s http://getcomposer.org/installer | php \
|
&& mv composer.phar /usr/local/bin/composer \
|
||||||
&& mv composer.phar /usr/local/bin/composer
|
&& git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
|
||||||
|
|
||||||
RUN git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
|
|
||||||
|
|
||||||
COPY root /
|
COPY root /
|
||||||
|
|
||||||
RUN cd /var/www/wallabag \
|
RUN set -ex \
|
||||||
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist
|
&& cd /var/www/wallabag \
|
||||||
|
&& SYMFONY_ENV=prod composer install --no-dev -o --prefer-dist \
|
||||||
RUN chown -R nobody:nobody /var/www/wallabag
|
&& chown -R nobody:nobody /var/www/wallabag
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
ENTRYPOINT ["/entrypoint.sh"]
|
ENTRYPOINT ["/entrypoint.sh"]
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ $ docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/con
|
|||||||
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:
|
||||||
|
|
||||||
```
|
```
|
||||||
version: '2'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
wallabag:
|
wallabag:
|
||||||
image: wallabag/wallabag
|
image: wallabag/wallabag
|
||||||
|
|||||||
@@ -1,16 +1,26 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
provisioner () {
|
||||||
|
echo "Starting provisioner..."
|
||||||
|
if ! out=`ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local "$@"`;then
|
||||||
|
echo $out;
|
||||||
|
fi
|
||||||
|
echo "Provisioner finished."
|
||||||
|
}
|
||||||
|
|
||||||
if [ "$1" = "wallabag" ];then
|
if [ "$1" = "wallabag" ];then
|
||||||
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
|
provisioner
|
||||||
exec s6-svscan /etc/s6/
|
exec s6-svscan /etc/s6/
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "import" ];then
|
if [ "$1" = "import" ];then
|
||||||
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local --skip-tags=firstrun
|
provisioner --skip-tags=firstrun
|
||||||
cd /var/www/wallabag/
|
cd /var/www/wallabag/
|
||||||
exec su -c "bin/console wallabag:import:redis-worker -e=prod $2 -vv" -s /bin/sh nobody
|
exec su -c "bin/console wallabag:import:redis-worker -e=prod $2 -vv" -s /bin/sh nobody
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "migrate" ];then
|
if [ "$1" = "migrate" ];then
|
||||||
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local
|
provisioner
|
||||||
cd /var/www/wallabag/
|
cd /var/www/wallabag/
|
||||||
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
|
exec su -c "bin/console doctrine:migrations:migrate --env=prod --no-interaction" -s /bin/sh nobody
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -70,6 +70,7 @@
|
|||||||
login_port={{ database_port }}
|
login_port={{ database_port }}
|
||||||
login_user=root
|
login_user=root
|
||||||
login_password="{{ database_root_password_mariadb }}"
|
login_password="{{ database_root_password_mariadb }}"
|
||||||
|
encoding="utf8mb4"
|
||||||
notify: run install
|
notify: run install
|
||||||
when: (database_driver == 'pdo_mysql') and
|
when: (database_driver == 'pdo_mysql') and
|
||||||
(populate_database == True)
|
(populate_database == True)
|
||||||
|
|||||||
Reference in New Issue
Block a user