Docker and Redis for dummies

Since I need a server cache solution for my website and I’ve always been advised to use Docker and Redis for this, I trie exactly that :flushed:
The whole thing reads like Chinese to me :thinking:

What have I already done:

  • Docker Desktop installed :white_check_mark:
  • Docker set as server type on my local environment :white_check_mark:
    The connection seems to be working

My questions:

  • My current locale version runs with Wampserver and Mysql8
    Am I correct in assuming that I have to create a new DB on the Docker Server?

Thank you for your help

How much development have you put into the local MySQL server?

If it’s minimal, then my recommendation is to recreate it in Wappler’s Database Manager. You will get additional features like being able to create seed data, the ability to create database templates, and more.

Wappler with Docker can connect to external databases, but, in order to help simplify the complexities you’re encountering, I would use Wappler to manage everything.

I need to work with Mysql8 or Mariadb(Remote).

Potentially. If there isn’t already an API that you could use connect to the existing MySQL, you could setup two projects created in Wappler.

The first that connects to the existing MySQL where you setup APIs for the second project to connect to it and pull the data into the new project’s database.

I’m not sure you’ll be able to run both locally, so you may need to deploy the project with existing MySQL to a cloud server, so you can then use API Actions in the new project to connect to the old project and populate the db with the data.

If you take a look at these videos.they refer to msql and MariaDB but redis is also one of the options, technique is identical.

You can then reference the redis db in settings

Redis is already deployed and you already have a default database which you can connect to it without authentication

Unfortunately, connecting from Wappler to Redis is not quite implemented, or at least wasn’t the last time I checked, that’s why you’ll find a Redis custom extension on this forum made by user tbvgl, but only for NodeJS.

Redis is easy, but working with it in Wappler is not beginner-friendly, unless you plan to stick to Redis features natively supported by Wappler (I don’t know which features)

1 Like

To be honest, I’m pretty frustrated. :weary:
I just need a way to cache my website to satisfy Google and my visitors.
This should be a topic for all developers in order to create user-friendly websites.

Why is it so complicated to establish an essential function?
That should be standard.

I have now spent a lot of time learning and creating my site with Wappler. To find out now, I still have to learn to work with Docker and Redis.

I get the impression I should have just stuck with my Wordpress site…

Have you tried this?

yes, the nightmare with Redis and Docker began with the tutorial.

I am currently using Wampserver for my local database and shared hosting online.

Even if I get the whole thing implemented locally (which I’m still a long way from)
Although I have the option to activate Redis in my server environment, I have no idea what to do next.

As you can see, I’m standing like an idiot in front of a black wall :unamused: :bowing_man:

Sorry to hear that, you did everything good, you found an unrelated bug which I’ve now reported.

This is an easy fix, you just go here: (you need to be using Docker)

And you type the command it tells you to run on the screenshot you posted:
npm install mysql2 --save

I’m not sure if you can configure Wappler to use a UNIX socket to connect to Redis yet, but this is not a deal-breaker in any way, I’m sure the Wappler team could come with a fix “moderately” fast…

In the latest Wappler 6.2, package.json is always updated directly and new modules installed, when new database connection are made.