mirror of
https://github.com/wallabag/docker
synced 2025-12-14 10:16:35 +00:00
Compare commits
27 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1aeffca4e | ||
|
|
b49d7faf71 | ||
|
|
bce0488aed | ||
|
|
1d42727517 | ||
|
|
939b644424 | ||
|
|
3f62284368 | ||
|
|
7a99f1ef73 | ||
|
|
537b502424 | ||
|
|
bfd3fe3d55 | ||
|
|
ed49d39db4 | ||
|
|
983bfe094b | ||
|
|
37216dfd69 | ||
|
|
13862eca8f | ||
|
|
55b4290605 | ||
|
|
7873719099 | ||
|
|
05d9d45a54 | ||
|
|
13818bd90e | ||
|
|
1b5fe1a934 | ||
|
|
9d44149e4d | ||
|
|
2b99017b25 | ||
|
|
a85e592e6e | ||
|
|
f4a8e5eadc | ||
|
|
f460f40b8c | ||
|
|
58c3977a3c | ||
|
|
aede9b9c98 | ||
|
|
749587fb4f | ||
|
|
6839862b04 |
57
.github/workflows/publish.yml
vendored
Normal file
57
.github/workflows/publish.yml
vendored
Normal file
@@ -0,0 +1,57 @@
|
|||||||
|
name: Publish Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
push_to_registries:
|
||||||
|
name: Push Docker image to multiple registries
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
packages: write
|
||||||
|
contents: read
|
||||||
|
steps:
|
||||||
|
- name: Check out the repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Log in to Docker Hub
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: Log in to the Container registry
|
||||||
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# Documentation: https://github.com/docker/setup-qemu-action
|
||||||
|
- name: Set up QEMU
|
||||||
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
|
# Documentation: https://github.com/docker/setup-buildx-action
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
id: buildx
|
||||||
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
|
- name: Extract metadata (tags, labels) for Docker
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
|
with:
|
||||||
|
images: |
|
||||||
|
wallabag/wallabag
|
||||||
|
ghcr.io/${{ github.repository }}
|
||||||
|
|
||||||
|
- name: Build and push Docker images
|
||||||
|
uses: docker/build-push-action@v2
|
||||||
|
with:
|
||||||
|
context: .
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
||||||
|
# Support for different platforms, see here:
|
||||||
|
# https://github.com/docker/buildx/blob/master/docs/reference/buildx_build.md#-set-the-target-platforms-for-the-build---platform
|
||||||
|
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
FROM alpine:3.12
|
FROM alpine:3.15
|
||||||
|
|
||||||
LABEL maintainer "Marvin Steadfast <marvin@xsteadfastx.org>"
|
LABEL maintainer "Marvin Steadfast <marvin@xsteadfastx.org>"
|
||||||
|
|
||||||
ARG WALLABAG_VERSION=2.4.0
|
ARG WALLABAG_VERSION=2.5.1
|
||||||
|
|
||||||
RUN apk add gnu-libiconv --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted
|
RUN apk add gnu-libiconv --update-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/community/ --allow-untrusted
|
||||||
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
|
ENV LD_PRELOAD /usr/lib/preloadable_libiconv.so php
|
||||||
@@ -51,12 +51,14 @@ RUN set -ex \
|
|||||||
s6 \
|
s6 \
|
||||||
tar \
|
tar \
|
||||||
tzdata \
|
tzdata \
|
||||||
|
make \
|
||||||
|
bash \
|
||||||
&& rm -rf /var/cache/apk/* \
|
&& rm -rf /var/cache/apk/* \
|
||||||
&& 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 https://getcomposer.org/installer | php \
|
&& curl -s https://getcomposer.org/installer | php \
|
||||||
&& mv composer.phar /usr/local/bin/composer \
|
&& mv composer.phar /usr/local/bin/composer \
|
||||||
&& composer selfupdate --1 \
|
&& composer selfupdate 2.2.12 \
|
||||||
&& git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
|
&& git clone --branch $WALLABAG_VERSION --depth 1 https://github.com/wallabag/wallabag.git /var/www/wallabag
|
||||||
|
|
||||||
COPY root /
|
COPY root /
|
||||||
|
|||||||
33
README.md
33
README.md
@@ -42,19 +42,20 @@ Default login is `wallabag:wallabag`.
|
|||||||
- `-e SYMFONY__ENV__REDIS_PASSWORD=...` (defaults to "~", this is the password defined in the Redis server configuration)
|
- `-e SYMFONY__ENV__REDIS_PASSWORD=...` (defaults to "~", this is the password defined in the Redis server configuration)
|
||||||
- `-e SYMFONY__ENV__SENTRY_DSN=...` (defaults to "~", this is the data source name for sentry)
|
- `-e SYMFONY__ENV__SENTRY_DSN=...` (defaults to "~", this is the data source name for sentry)
|
||||||
- `-e POPULATE_DATABASE=...`(defaults to "True". Does the DB has to be populated or is it an existing one)
|
- `-e POPULATE_DATABASE=...`(defaults to "True". Does the DB has to be populated or is it an existing one)
|
||||||
|
- `-e SYMFONY__ENV__SERVER_NAME=...` (defaults to "Your wallabag instance". Specifies a user-friendly name for the 2FA issuer)
|
||||||
|
|
||||||
## SQLite
|
## SQLite
|
||||||
|
|
||||||
The easiest way to start wallabag is to use the SQLite backend. You can spin that up with
|
The easiest way to start wallabag is to use the SQLite backend. You can spin that up with
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -p 80:80 wallabag/wallabag
|
$ docker run -p 80:80 -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
and point your browser to `http://localhost:80`. For persistent storage you should start the container with a volume:
|
and point your browser to `http://localhost`. For persistent storage you should start the container with a volume:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -p 80:80 wallabag/wallabag
|
$ docker run -v /opt/wallabag/data:/var/www/wallabag/data -v /opt/wallabag/images:/var/www/wallabag/web/assets/images -p 80:80 -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
## MariaDB / MySQL
|
## MariaDB / MySQL
|
||||||
@@ -63,7 +64,7 @@ For using MariaDB or MySQL you have to define some environment variables with th
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
|
$ docker run --name wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -d mariadb
|
||||||
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -e "SYMFONY__ENV__DATABASE_CHARSET=utf8mb4" -p 80:80 wallabag/wallabag
|
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "MYSQL_ROOT_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=3306" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -e "SYMFONY__ENV__DATABASE_CHARSET=utf8mb4" -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" -p 80:80 wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
## PostgreSQL
|
## PostgreSQL
|
||||||
@@ -72,7 +73,7 @@ For using PostgreSQL you have to define some environment variables with the cont
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -d postgres:9.6
|
$ docker run --name wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -d postgres:9.6
|
||||||
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=5432" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -p 80:80 wallabag/wallabag
|
$ docker run --name wallabag --link wallabag-db:wallabag-db -e "POSTGRES_PASSWORD=my-secret-pw" -e "POSTGRES_USER=my-super-user" -e "SYMFONY__ENV__DATABASE_DRIVER=pdo_pgsql" -e "SYMFONY__ENV__DATABASE_HOST=wallabag-db" -e "SYMFONY__ENV__DATABASE_PORT=5432" -e "SYMFONY__ENV__DATABASE_NAME=wallabag" -e "SYMFONY__ENV__DATABASE_USER=wallabag" -e "SYMFONY__ENV__DATABASE_PASSWORD=wallapass" -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" -p 80:80 wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
## Redis
|
## Redis
|
||||||
@@ -81,13 +82,13 @@ To use redis with a Docker link, a redis container with the name `redis` is need
|
|||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -p 6379:6379 --name redis redis:alpine
|
$ docker run -p 6379:6379 --name redis redis:alpine
|
||||||
$ docker run -p 80:80 --link redis:redis wallabag/wallabag
|
$ docker run -p 80:80 -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" --link redis:redis wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
To use redis with an external redis host, set the appropriate environmental variables. Example:
|
To use redis with an external redis host, set the appropriate environmental variables. Example:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ docker run -p 80:80 -e "SYMFONY__ENV__REDIS_HOST=my.server.hostname" -e "SYMFONY__ENV__REDIS_PASSWORD=my-secret-pw" wallabag/wallabag
|
$ docker run -p 80:80 -e "SYMFONY__ENV__REDIS_HOST=my.server.hostname" -e "SYMFONY__ENV__REDIS_PASSWORD=my-secret-pw" -e "SYMFONY__ENV__DOMAIN_NAME=http://localhost" wallabag/wallabag
|
||||||
```
|
```
|
||||||
|
|
||||||
## Upgrading
|
## Upgrading
|
||||||
@@ -106,7 +107,7 @@ $ docker exec -t NAME_OR_ID_OF_YOUR_WALLABAG_CONTAINER /var/www/wallabag/bin/con
|
|||||||
|
|
||||||
## docker-compose
|
## docker-compose
|
||||||
|
|
||||||
It's a good way to use [docker-compose](https://docs.docker.com/compose/). Example:
|
An example [docker-compose](https://docs.docker.com/compose/) file can be seen below:
|
||||||
|
|
||||||
```
|
```
|
||||||
version: '3'
|
version: '3'
|
||||||
@@ -127,18 +128,34 @@ services:
|
|||||||
- SYMFONY__ENV__MAILER_PASSWORD=~
|
- SYMFONY__ENV__MAILER_PASSWORD=~
|
||||||
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
||||||
- SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-url-instance.com
|
- SYMFONY__ENV__DOMAIN_NAME=https://your-wallabag-url-instance.com
|
||||||
|
- SYMFONY__ENV__SERVER_NAME="Your wallabag instance"
|
||||||
ports:
|
ports:
|
||||||
- "80"
|
- "80"
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
|
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "wget" ,"--no-verbose", "--tries=1", "--spider", "http://localhost"]
|
||||||
|
interval: 1m
|
||||||
|
timeout: 3s
|
||||||
|
depends_on:
|
||||||
|
- db
|
||||||
|
- redis
|
||||||
db:
|
db:
|
||||||
image: mariadb
|
image: mariadb
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
- MYSQL_ROOT_PASSWORD=wallaroot
|
||||||
volumes:
|
volumes:
|
||||||
- /opt/wallabag/data:/var/lib/mysql
|
- /opt/wallabag/data:/var/lib/mysql
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
|
||||||
|
interval: 20s
|
||||||
|
timeout: 3s
|
||||||
redis:
|
redis:
|
||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "redis-cli", "ping"]
|
||||||
|
interval: 20s
|
||||||
|
timeout: 3s
|
||||||
```
|
```
|
||||||
|
|
||||||
Note that you must fill out the mail related variables according to your mail config.
|
Note that you must fill out the mail related variables according to your mail config.
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ fi
|
|||||||
if [ "$1" = "import" ];then
|
if [ "$1" = "import" ];then
|
||||||
provisioner --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 --env=prod $2 -vv" -s /bin/sh nobody
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = "migrate" ];then
|
if [ "$1" = "migrate" ];then
|
||||||
|
|||||||
@@ -36,6 +36,7 @@
|
|||||||
redis_path: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PATH')|default('~', true) }}"
|
redis_path: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PATH')|default('~', true) }}"
|
||||||
redis_password: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PASSWORD')|default('~', true) }}"
|
redis_password: "{{ lookup('env', 'SYMFONY__ENV__REDIS_PASSWORD')|default('~', true) }}"
|
||||||
sentry_dsn: "{{ lookup('env', 'SYMFONY__ENV__SENTRY_DSN')|default('~', true) }}"
|
sentry_dsn: "{{ lookup('env', 'SYMFONY__ENV__SENTRY_DSN')|default('~', true) }}"
|
||||||
|
server_name: "{{ lookup('env', 'SYMFONY__ENV__SERVER_NAME')|default('Your wallabag instance', true) }}"
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
|||||||
@@ -58,3 +58,6 @@ parameters:
|
|||||||
|
|
||||||
# sentry logging
|
# sentry logging
|
||||||
sentry_dsn: {{ sentry_dsn }}
|
sentry_dsn: {{ sentry_dsn }}
|
||||||
|
|
||||||
|
# User-friendly name of your instance for 2FA issuer
|
||||||
|
server_name: {{ server_name }}
|
||||||
|
|||||||
@@ -58,3 +58,6 @@ parameters:
|
|||||||
|
|
||||||
# sentry logging
|
# sentry logging
|
||||||
sentry_dsn: ~
|
sentry_dsn: ~
|
||||||
|
|
||||||
|
# User-friendly name of your instance for 2FA issuer
|
||||||
|
server_name: Your wallabag instance
|
||||||
|
|||||||
Reference in New Issue
Block a user