Migrating from docker server to local server

Wappler Version: 3.9.7
Operating System: Mac OS 11.4 (20F71)
Server Model: NodeJS
Database Type: MySQL
Hosting Type: Docker / Host

Expected behavior

Create a new target outside docker and update the db connection for this new target.

Actual behavior

It creates the new target without all the necessary files and folders from the original target (located on: .wappler/targets/(your_new_target)/app/modules/…) and with some troubles on the db.json file.

How to reproduce

  1. create a new Wappler proyect using Docker Engine for Hosting and NodeJS as server model
  2. enable a db connection (Docker’s default mysql server)
  3. enable redis
  4. create a new Security Provider inside globals/security providers option on Server Connect view.
  5. create a sample login.
  6. create a new target using Own Server
  7. run a redis image on Docker for the new target and bind the port to make it visible on your local machine.
  8. configure redis for the new target
    image
  9. Run the local server (all should run perfectly)
  10. try to make a login and this error will appear:

server-connect:server Got error? Error: getaddrinfo ENOTFOUND db
server-connect:server at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) {
server-connect:server errno: -3008,
server-connect:server code: ‘ENOTFOUND’,
server-connect:server syscall: ‘getaddrinfo’,
server-connect:server hostname: ‘db’,
server-connect:server fatal: true
server-connect:server } +11s

How I could solve the bug

I solved this bug by coping all the .wappler/targets/Docker/app/modules content and the pasting it on the new target folder. Then I modify the two db.json files manually (the one on .wappler/targets/(your_new_target)/app/modules/connections and the other on .wappler/targets/(your_new_target)/databases).

This made my target work correctly.

PS: Thanks for this AMAZING tool

Community Page
Last updated: