mirror of
https://github.com/nickyeoman/docker-compose-cookbooks.git
synced 2026-09-04 02:46:23 +00:00
wallabag should work now.
This commit is contained in:
@@ -0,0 +1,29 @@
|
|||||||
|
Here is what I posted to github issues:
|
||||||
|
|
||||||
|
https://github.com/wallabag/docker/issues/153
|
||||||
|
|
||||||
|
In the hopes of saving someone else time, the Ansible script that runs is located here:
|
||||||
|
entrypoint.yml
|
||||||
|
|
||||||
|
for some reason when Ansible tries to connect to the db host, mariadb closes the connetion:
|
||||||
|
[Warning] Aborted connection 8 to db: 'unconnected' user: 'unauthenticated' host: '192.168.0.4' (This connection closed normally without authentication)
|
||||||
|
|
||||||
|
even though when you connect to the container:
|
||||||
|
docker exec -it dcebf5dcbda1 sh
|
||||||
|
|
||||||
|
you can connect to the database just fine:
|
||||||
|
mysql -h $SYMFONY__ENV__DATABASE_HOST -u root -p$MYSQL_ROOT_PASSWORD
|
||||||
|
|
||||||
|
But if I manually run the playbook:
|
||||||
|
ansible-playbook -i /etc/ansible/hosts /etc/ansible/entrypoint.yml -c local "$@"
|
||||||
|
|
||||||
|
I get the warning:
|
||||||
|
[WARNING]: Found both group and host with same name: localhost
|
||||||
|
|
||||||
|
But the playbook successfully completes.
|
||||||
|
|
||||||
|
If it doesn't (or if you have defined the mariadb user and database name in your compose file) you can try the POPULATE_DATABASE=false and then run php bin/console wallabag:install --env=prod -n from the /var/www/wallabag directory.
|
||||||
|
|
||||||
|
I think (untested) if you ran ansible-playbook -i ${HOSTNAME}, /etc/ansible/entrypoint.yml -c local "$@" instead of using an inventory and there was a check for if {{ database_name }} exists - name: add mariadb db in the playbook, it might work a little better. But I'm not sure how to stop mariadb from closing the connection.
|
||||||
|
|
||||||
|
hope this helps.
|
||||||
+17
-20
@@ -1,3 +1,10 @@
|
|||||||
|
###############################################################################
|
||||||
|
# reference link: https://geek-cookbook.funkypenguin.co.nz/recipes/wallabag/
|
||||||
|
# You will want this for environment:
|
||||||
|
# https://doc.wallabag.org/en/admin/parameters.html
|
||||||
|
# and main docker page:
|
||||||
|
# https://github.com/wallabag/docker/blob/master/README.md
|
||||||
|
###############################################################################
|
||||||
---
|
---
|
||||||
version: '3'
|
version: '3'
|
||||||
|
|
||||||
@@ -19,26 +26,22 @@ services:
|
|||||||
- wallabag-db:/var/lib/mysql
|
- wallabag-db:/var/lib/mysql
|
||||||
networks:
|
networks:
|
||||||
- admin_web
|
- admin_web
|
||||||
command: mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --character-set-client-handshake=FALSE
|
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD: ${WALLABAG_MYSQL_ROOT_PASSWORD}
|
MYSQL_ROOT_PASSWORD: ${WALLABAG_MYSQL_ROOT_PASSWORD}
|
||||||
MYSQL_USER: wallabag
|
# Do not define mysql info, an ansible script in wallabag does that.
|
||||||
MYSQL_PASSWORD: ${WALLABAG_MYSQL_PASSWORD}
|
|
||||||
MYSQL_DATABASE: wallabag
|
|
||||||
MYSQL_ROOT_HOST: "172.18.0.20"
|
|
||||||
|
|
||||||
wallabag:
|
wallabag:
|
||||||
#https://hub.docker.com/r/wallabag/wallabag
|
#https://hub.docker.com/r/wallabag/wallabag
|
||||||
image: wallabag/wallabag:${WALLABAG_V}
|
image: wallabag/wallabag:${WALLABAG_V}
|
||||||
healthcheck:
|
|
||||||
test: ["CMD", "curl" , "-f", "http://localhost:80"]
|
|
||||||
interval: 30s
|
|
||||||
timeout: 10s
|
|
||||||
retries: 5
|
|
||||||
environment:
|
environment:
|
||||||
- TZ=it-IT
|
- TZ=it-IT
|
||||||
- PUID=1000
|
- PUID=1000
|
||||||
- PGID=1000
|
- PGID=1000
|
||||||
|
- SYMFONY__ENV__DOMAIN_NAME=https://${WALLABAG_DOMAIN_NAME}
|
||||||
|
# 30 characters, try:
|
||||||
|
- SYMFONY__ENV__SECRET=${WALLABAG_SECRET}
|
||||||
|
- SYMFONY__ENV__FOSUSER_REGISTRATION=false
|
||||||
|
# MYSQL
|
||||||
- MYSQL_ROOT_PASSWORD=${WALLABAG_MYSQL_ROOT_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${WALLABAG_MYSQL_ROOT_PASSWORD}
|
||||||
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
|
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
|
||||||
- SYMFONY__ENV__DATABASE_HOST=${PREFIX}_wallabag-db_1
|
- SYMFONY__ENV__DATABASE_HOST=${PREFIX}_wallabag-db_1
|
||||||
@@ -47,18 +50,12 @@ services:
|
|||||||
- SYMFONY__ENV__DATABASE_USER=wallabag
|
- SYMFONY__ENV__DATABASE_USER=wallabag
|
||||||
- SYMFONY__ENV__DATABASE_PASSWORD=${WALLABAG_MYSQL_PASSWORD}
|
- SYMFONY__ENV__DATABASE_PASSWORD=${WALLABAG_MYSQL_PASSWORD}
|
||||||
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
|
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
|
||||||
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
|
# Redis
|
||||||
- SYMFONY__ENV__MAILER_USER=~
|
|
||||||
- SYMFONY__ENV__MAILER_PASSWORD=~
|
|
||||||
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
|
||||||
- SYMFONY__ENV__DOMAIN_NAME=https://${WALLABAG_DOMAIN_NAME}
|
|
||||||
- SYMFONY__ENV__REDIS_HOST=${PREFIX}_wallabag-redis_1
|
- SYMFONY__ENV__REDIS_HOST=${PREFIX}_wallabag-redis_1
|
||||||
- SYMFONY__ENV__SECRET=Fm0r4R
|
# Mailer doesn't work until v2.4
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- wallabag:/var/www/wallabag/web/assets/images
|
- wallabag:/var/www/wallabag/web/assets/images
|
||||||
expose:
|
|
||||||
- "80"
|
|
||||||
- "443"
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- wallabag-db
|
- wallabag-db
|
||||||
links:
|
links:
|
||||||
@@ -70,7 +67,7 @@ services:
|
|||||||
- "traefik.http.routers.${PREFIX}_wallabag.rule=Host(`${WALLABAG_DOMAIN_NAME}`)"
|
- "traefik.http.routers.${PREFIX}_wallabag.rule=Host(`${WALLABAG_DOMAIN_NAME}`)"
|
||||||
- "traefik.http.routers.${PREFIX}_wallabag.entrypoints=websecure"
|
- "traefik.http.routers.${PREFIX}_wallabag.entrypoints=websecure"
|
||||||
- "traefik.http.routers.${PREFIX}_wallabag.tls.certresolver=letsencrypt"
|
- "traefik.http.routers.${PREFIX}_wallabag.tls.certresolver=letsencrypt"
|
||||||
- "traefik.http.services.${PREFIX}_wallabag.loadbalancer.server.port=443"
|
- "traefik.http.services.${PREFIX}_wallabag.loadbalancer.server.port=80"
|
||||||
|
|
||||||
wallabag-redis:
|
wallabag-redis:
|
||||||
image: redis:5.0.9
|
image: redis:5.0.9
|
||||||
|
|||||||
+3
-1
@@ -1,10 +1,12 @@
|
|||||||
# Domains & Project
|
# Domains & Project
|
||||||
PREFIX=p1
|
PREFIX=test
|
||||||
WALLABAG_DOMAIN_NAME=wallabag.nickyeoman.com
|
WALLABAG_DOMAIN_NAME=wallabag.nickyeoman.com
|
||||||
|
|
||||||
# Passwords
|
# Passwords
|
||||||
WALLABAG_MYSQL_ROOT_PASSWORD=ChangeMe2ASecurepass!
|
WALLABAG_MYSQL_ROOT_PASSWORD=ChangeMe2ASecurepass!
|
||||||
WALLABAG_MYSQL_PASSWORD=Again2ASecurepass!
|
WALLABAG_MYSQL_PASSWORD=Again2ASecurepass!
|
||||||
|
# pwgen -cnsB1v 30
|
||||||
|
WALLABAG_SECRET=qKpJcffTtjKqLbgJX9gWN9FHgrjF7v
|
||||||
|
|
||||||
# Software versions
|
# Software versions
|
||||||
DB_V=10.4.11
|
DB_V=10.4.11
|
||||||
|
|||||||
@@ -1,30 +0,0 @@
|
|||||||
version: '3'
|
|
||||||
services:
|
|
||||||
wallabag:
|
|
||||||
image: wallabag/wallabag
|
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
|
||||||
- SYMFONY__ENV__DATABASE_DRIVER=pdo_mysql
|
|
||||||
- SYMFONY__ENV__DATABASE_HOST=db
|
|
||||||
- SYMFONY__ENV__DATABASE_PORT=3306
|
|
||||||
- SYMFONY__ENV__DATABASE_NAME=wallabag
|
|
||||||
- SYMFONY__ENV__DATABASE_USER=wallabag
|
|
||||||
- SYMFONY__ENV__DATABASE_PASSWORD=wallapass
|
|
||||||
- SYMFONY__ENV__DATABASE_CHARSET=utf8mb4
|
|
||||||
- SYMFONY__ENV__MAILER_HOST=127.0.0.1
|
|
||||||
- SYMFONY__ENV__MAILER_USER=~
|
|
||||||
- SYMFONY__ENV__MAILER_PASSWORD=~
|
|
||||||
- SYMFONY__ENV__FROM_EMAIL=wallabag@example.com
|
|
||||||
- SYMFONY__ENV__DOMAIN_NAME=https://kim.nickyeoman.com:8000
|
|
||||||
ports:
|
|
||||||
- 8000:80
|
|
||||||
volumes:
|
|
||||||
- /opt/wallabag/images:/var/www/wallabag/web/assets/images
|
|
||||||
db:
|
|
||||||
image: mariadb
|
|
||||||
environment:
|
|
||||||
- MYSQL_ROOT_PASSWORD=wallaroot
|
|
||||||
volumes:
|
|
||||||
- /opt/wallabag/data:/var/lib/mysql
|
|
||||||
redis:
|
|
||||||
image: redis:alpine
|
|
||||||
Reference in New Issue
Block a user