Coder Social home page Coder Social logo

Comments (15)

degobbis avatar degobbis commented on July 30, 2024

Hello Pieter-Jan,

please first make sure that port 53 is free in Kubuntu and that the BIND container is started when docker-lamp boots.

If that fits, go into the network settings of your connection and set it to get only the IP dynamically.

Then set the domain server to 127.0.0.1, and restart the network connection.

This is necessary so that DNS queries are first run on the BIND container and then resolved externally.

Then the domains should be resolved again.

About MySQL, actually the same, make sure port 3306 is not used before you start.

from docker-lamp.

pjdevries avatar pjdevries commented on July 30, 2024

I found the culprit of that second issue: db-data-dir. This location does not change when switching databases. If a MariaDB database already exists, which happened in my case, switching to MySQL fails.

In the custom branch I used in WSL2 I already made a provision for keeping my databases in directories of my choosing, being my custom .../data/db/DATABASE_TO_USE . This automatically prevents this conflict from occurring.

Once I have everything working properly again, I will send a pull request for that modification.

from docker-lamp.

degobbis avatar degobbis commented on July 30, 2024

In my version the db-data directory is only used as a volume. If you want to switch between MariaDB and MySQL, then you have to shutdown the server with shutdown and start it up again after the change in the.env.

The databases are stored in the initDB folder and reloaded on startup.

So there are no problems with the switch.

from docker-lamp.

pjdevries avatar pjdevries commented on July 30, 2024

In my version the db-data directory is only used as a volume. If you want to switch between MariaDB and MySQL, then you have to shutdown the server with shutdown and start it up again after the change in the.env.

The databases are stored in the initDB folder and reloaded on startup.

So there are no problems with the switch.

I guess you assume ARCHIVE_DATABASES=1, which it is not in my case and actually does cause the mentioned problem :)

from docker-lamp.

degobbis avatar degobbis commented on July 30, 2024

Nope,
This option, I mean, is currently without functionality.

On shutdown the server, my script will save all the databases as SQL dumps and the db-data-dir volume will be deleted.
At startup, the databases are restored in the new database system. This avoids exactly this error.

from docker-lamp.

pjdevries avatar pjdevries commented on July 30, 2024

What can I say. The only thing I can say is the problem occurred before I moved the databases out of the db-data-dir volume and disappeared once I moved them to a custom location.

Apart from solving my problem, my adjustment allows moving the databases to a custom location. Is it a PR worth looking at or do I not need to bother?

from docker-lamp.

degobbis avatar degobbis commented on July 30, 2024

Thanks for your suggestion, but it's not necessary.
The db-data-dir volume is only temporary and will be deleted on clean shutdown and created again on startup.

The databases are in the APP_BASEDIR/initDB folder and are restored on startup.

Another approach does not make sense to me, because otherwise you would have to duplicate the databases for the different database types, or the volumes must never break (otherwise data loss).

It also has the advantage that I can also feed the database dumps to an online server at any time.

Can we close the issue then?

from docker-lamp.

pjdevries avatar pjdevries commented on July 30, 2024

It's your repo, so you can close it whenever you like :D However, having the ability to move database to a custom location, does not mean one has to. One of the things I appreciate about your setup, is it configurability. This also is just a configurable option.

Before closing the topic, I do still have some difficulty getting BIND to do it's thing. Port 53 is free, the BIND container is running and resolvectl status says DNS Servers: 127.0.0.1. Unfortunately my domains are still not reachable without an /etc/host entry. Any more suggestions?

from docker-lamp.

degobbis avatar degobbis commented on July 30, 2024

what says for example nslookup joomla.local

from docker-lamp.

degobbis avatar degobbis commented on July 30, 2024

Postscript:
Did you check the IP for the mapping in the .env?

from docker-lamp.

degobbis avatar degobbis commented on July 30, 2024

Can you please post the output of /etc/resolv.conf?
Also the values from REMOTE_HOST_IP, TLD_SUFFIX and BIND_DNS_RESOLVER

from docker-lamp.

pjdevries avatar pjdevries commented on July 30, 2024

what says for example nslookup joomla.local

That's a clever one. It says:

Server:         192.168.10.9
Address:        192.168.10.9#53

** server can't find joomla.local: NXDOMAI

My workstation gets it's ip address and other stuff from a FRITZ!Box DHCP server, which also serves as the gateway and forwarding DNS server. It appears requests are sent to the FRITZ!Box, even though resolvectl status reports 127.0.0,1 being the DNS.

Can you please post the output of /etc/resolv.conf?

ameserver 192.168.10.9
nameserver 127.0.0.1
nameserver fd00::e228:6dff:fe7c:a466
search .

Bare in mind that resolv.conf is generated by NetworkManager on a default (K)ubuntu system.

REMOTE_HOST_IP="172.17.0.1"
TLD_SUFFIX="local=$REMOTE_HOST_IP,test=$REMOTE_HOST_IP"
BIND_DNS_RESOLVER="192.168.10.9"

from docker-lamp.

pjdevries avatar pjdevries commented on July 30, 2024

By the way, I gladly compensate some of your time for helping me. Maybe we can even use Signal to communicate more efficiently?

from docker-lamp.

degobbis avatar degobbis commented on July 30, 2024

You can find me on Mattermost for Joomla with the nick @guido-de-gobbis

from docker-lamp.

pjdevries avatar pjdevries commented on July 30, 2024

See you there then :)

from docker-lamp.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.