Advice on Staging System Setup

Hi Wapplers,
I am hoping someone can point me in the right direction.
I have a local development docker engine target (NodeJS) running Wappler on my Mac.
I have a remote Production docker engine target (NodeJS) running in a Digital Ocean Droplet.

This is working nicely. However…

I have on my same LAN another Mac that I want to use a Staging/Development mirror environment, this doesn’t have Wappler, but does have Docker. I can open up my router firewall to allow external access to this IP for testing.

Can someone help with the best way I can configure this.
I cannot work out how to do this in Wappler Target config. Is this setup possible?

Thanks in advance.

ideas/thoughts would really be appreciated. I

Forgive me, but am I asking a real dumb question?
Surely other users have or required a similar config? Would it be easier to set the Hosting to Own Server and setup NodeJS on the other Mac and publish to a folder on that machine? Sorry, just never set this up before.

This is one of the reasons I never use Docker. Using Mamp Pro gives much more flexibility.

Sorry I can’t be of help. I hope you find your answer.

1 Like

My opinion, is that your staging environment should mirror production in all aspects. So my recommendation is that your staging is also a remote production docker on DO. Staging is really a place to test production, so everything should match.

Thanks and I appreciate that @mebeingken, but what if I just want to have an environment to mirror my development system on my LAN? Is what I am asking not possible or at least not configurable within Wappler?

I have never attempted to do a remote docker install that does not use the wappler integration (ie. with aws or digital ocean, etc.)

Stackoverflow answer: You should be able using the Docker Engine server option in Wappler.

Correct answer: Ken is right. You might as well just use another local target on your development laptop and stage there. You are basically achieving headaches and no real impact with the landscape you are proposing.

Thanks @JonL
Lets say I want to develop on my laptop and use the spare mac on the LAN as the production (open up firewall etc)
Is this possible? Should I install NodeJS on there? or can I deploy to a remote Docker LAN container?

That case would make more sense from a landscape perspective. You are going to need to learn the basics of self-hosting. Specially in terms of network and security.

I recommend /r/selfhost in Reddit as a good source of information on the topic. It’s not just about opening a port. And you will need to do some due diligence on server hardening.

You can by using docker engine. There are a lot of tutorials out there that will explain how.
Wappler does facilitate part of the journey from the UI.

In the target chose docker engine as server and fill in the needed info for the remote deploy.

1 Like

Oh! I forgot.

Here you are.

You probably can skip some parts of the video as they will be irrelevant for your case.

Godspeed!

1 Like

Really struggled with this today. Going to start all over again tomorrow.
Is this something that could be added to the Wappler UI, so that a Remote Docker target could be a Docker Desktop running on another LAN IP?

If you are not used to this it can be difficult indeed. You need to know some basics regarding server management and docker.

The only way to know is by opening a Feature Request.

I set up a staging server on my lan a long time ago. It’s also exposed to the web through Traefik.

If you expose the docker API on the server you can pretty much control it from Wappler in the same way as your other environments. You can configure this on the server directly, or set up a docker container that exposes the API for you.

On my phone now so this is just from memory.

Thanks @namakemono and @JonL
So…
I have Wappler connecting to a Remote Docker Desktop target running on a Windows PC on the LAN,

I got this working simply by running…

netsh interface portproxy add v4tov4 listenport=2375 listenaddress=192.168.86.111 connectport=2375 connectaddress=127.0.0.1

Can anyone help with portproxy/forwarding port 2375 on my Mac OSX machine IP back to 127.0.0.1? I have followed a couple of guides online, but its not working.

e.g.

echo "
rdr pass proto tcp from any to 192.168.86.111 port 2375 -> 127.0.0.1 port 2375
"

Not sure I follow.

You basically want to do the same for a Mac ? Expose the docker API on the Mac so you can control it from Wappler?

Yes @namakemono
I cant seem to be able to allow a remote connection to Docker on port 2375 for the Mac 192.168.86.111

You are better off asking in more specialised forums. I would try with docker and selfhosting (sub)forums. Reddit and Stackoverflow seem like a good bet.

You might be able to get an answer or some support here but you might bump into further difficulties along the road and they will be able to help you better IMO.

Should in theory not be too difficult, but I just have linux servers so nothing to test on.

I am using this to expose the docker api through a container, no need to modify the host os.

I can spin the container up when I need access and stop it if I do not

Create certificate files to protect the daemon socket

Simple docker-compose.yml setup :

version: "3.4"
services:
  remote-api:
    image: kekru/docker-remote-api-tls:v0.3.0
    ports:
     - 2376:443
    volumes:
     - <local cert dir>:/data/certs:ro
     - /var/run/docker.sock:/var/run/docker.sock:ro

Connect from wappler (Im using my domain, but lan IP should work fine)