glowingblue / flarum-ext-redis-setup

Setup Redis using environment variables. Optionally enable Cache, Queue or Sessions
MIT License
5 stars 0 forks source link

Docker ENV not support #3

Open pomazanbohdan opened 1 month ago

pomazanbohdan commented 1 month ago

My container have env: REDIS_HOST=flarum-redis

but "Connection refused [tcp://127.0.0.1:6379]"

Use https://github.com/crazy-max/docker-flarum https://gitlab.xxlab.tech/xxlab/awesome-docker-compose/-/blob/master/flarum/docker-compose.yml?ref_type=heads

DavideIadeluca commented 1 month ago

Can you please share the output of docker ps ?

You should see something along the lines of:

CONTAINER ID   IMAGE                          COMMAND                  CREATED      STATUS      PORTS                                            NAMES
83a0d46fe9b4   89grad/flarum-acme:1.8.70   "docker-entrypoint.s…"   5 days ago   Up 5 days                                                    acme-worker
5ab2886ae30f   89grad/flarum-acme:1.8.70   "docker-entrypoint.s…"   5 days ago   Up 5 days                                                    acme-php
f7ebc298dc59   89grad/flarum-acme:1.8.70   "docker-entrypoint.s…"   5 days ago   Up 5 days   0.0.0.0:8080->8888/tcp, 0.0.0.0:8081->8889/tcp   acme-nginx
0c0b6a49512b   redis:7                        "docker-entrypoint.s…"   6 days ago   Up 6 days   6379/tcp                                         acme-redis
860a5f5107f3   mariadb:10.2                   "docker-entrypoint.s…"   6 days ago   Up 6 days   0.0.0.0:3306->3306/tcp                           acme-database
pomazanbohdan commented 1 month ago

NAME           IMAGE                        COMMAND                  SERVICE        CREATED             STATUS          PORTS
flarum         crazymax/flarum:latest       "/init"                  flarum         47 minutes ago      Up 17 minutes   8000/tcp
flarum-db      mariadb:latest               "docker-entrypoint.s…"   flarum-db      About an hour ago   Up 47 minutes   3306/tcp
flarum-redis   valkey/valkey:7-alpine3.20   "docker-entrypoint.s…"   flarum-redis   About an hour ago   Up 47 minutes   6379/tcp
pomazanbohdan commented 1 month ago

I don't use port forwarding as I use traefik

DavideIadeluca commented 1 month ago

Alright that seems to be looking okay, please share the extension settings at /admin#/extension/glowingblue-redis-setup. And just to double check, does your Forum run without this extension enabled?

pomazanbohdan commented 1 month ago

Forum run without this extension enabled?

Okay, it's working.

I included all three options that were there.

Now when I enable the add-on, it gives me an error and I have to delete it to get the forum working again.

DavideIadeluca commented 1 month ago

Please share the output of php flarum info

pomazanbohdan commented 1 month ago

Flarum core: 1.8.5
PHP version: 8.2.18
MySQL version: 11.4.2-MariaDB-ubu2404
Loaded extensions: Core, date, libxml, pcre, zlib, filter, hash, json, random, readline, Reflection, SPL, session, ctype, curl, dom, fileinfo, gd, gmp, iconv, intl, mbstring, openssl, PDO, standard, SimpleXML, sodium, tokenizer, xml, xmlwriter, zip, exif, mysqlnd, Phar, pdo_mysql, uuid, Zend OPcache
+----------------------------------------+---------+--------+
| Flarum Extensions                      |         |        |
+----------------------------------------+---------+--------+
| ID                                     | Version | Commit |
+----------------------------------------+---------+--------+
| flarum-markdown                        | v1.8.0  |        |
| flarum-flags                           | v1.8.0  |        |
| askvortsov-rich-text                   | v2.1.7  |        |
| flarum-sticky                          | v1.8.0  |        |
| flarum-tags                            | v1.8.0  |        |
| flarum-lock                            | v1.8.0  |        |
| flarum-suspend                         | v1.8.1  |        |
| flarum-nicknames                       | v1.8.0  |        |
| flarum-approval                        | v1.8.1  |        |
| widayn-avatar-cropper                  | v0.1.2  |        |
| v17development-blog                    | v0.7.7  |        |
| kilowhat-audit-free                    | 1.7.0   |        |
| justoverclock-discussion-info          | 0.1.5   |        |
| justoverclock-composer-autocomplete    | 0.1.0   |        |
| justoverclock-best-answer-badge        | 0.1.0   |        |
| justoverclock-be-active-user-indicator | 0.1.0   |        |
| justoverclock-auto-post-count-badge    | 1.0.0   |        |
| ianm-boring-avatars                    | 1.0.0   |        |
| fof-byobu                              | 1.3.6   |        |
| fof-best-answer                        | 1.4.5   |        |
| fof-anti-spam                          | 1.1.2   |        |
| fof-analytics                          | 1.1.0   |        |
| flarum-subscriptions                   | v1.8.0  |        |
| flarum-statistics                      | v1.8.0  |        |
| flarum-mentions                        | v1.8.3  |        |
| flarum-likes                           | v1.8.0  |        |
| flarum-lang-ukrainian                  | v1.44.0 |        |
| flarum-extension-manager               | v1.0.3  |        |
| flarum-emoji                           | v1.8.0  |        |
| datlechin-add-like-controls            | v1.0.6  |        |
| blomstra-user-filter                   | 0.1.4   |        |
| askvortsov-auto-moderator              | v0.1.3  |        |
| acpl-mobile-tab                        | 1.4.4   |        |
+----------------------------------------+---------+--------+
Base URL: https://flarum.dottek.co
Installation path: /opt/flarum
Queue driver: sync
Session driver: file
Scheduler status: Ніколи не запускалося
Mail driver: mail
Debug mode: ON

Don't forget to turn off debug mode! It should never be turned on in a production system.
DavideIadeluca commented 1 month ago

Can you try to install & enable https://github.com/blomstra/flarum-redis ? glowingblue/flarum-ext-redis-setup basically is just a wrapper of blomstra/flarum-redis in which features can be enabled/disabled in the UI. So if blomstra/flarum-redis doesn't work, I would suggest to create a new issue there

pomazanbohdan commented 1 month ago

I still have it. Yes, he probably doesn't have that option.