Class DefaultEmulatorEdgeRuntime
java.lang.Object
com.cloudforge.core.local.DefaultEmulatorEdgeRuntime
- All Implemented Interfaces:
EmulatorEdgeRuntime
Dockerized nginx edge for
*.cloudforge.localhost Host routing.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDockerEmulatorSupport.isHttpReachable(URI), notisHttpHealthy-- this is a plain reverse proxy with no default vhost, so an unmatchedGET /404s correctly the moment nginx itself is up, before any application route exists.booleanvoidrebuild()Remove container and recreate (same image; refresh bind mounts).Rewrite vhosts from Docker publishes and reload if the container is running.voidreload()voidstart()voidstop()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface EmulatorEdgeRuntime
ensureRunningAndReconcile, restart
-
Constructor Details
-
DefaultEmulatorEdgeRuntime
public DefaultEmulatorEdgeRuntime() -
DefaultEmulatorEdgeRuntime
-
-
Method Details
-
containerName
- Specified by:
containerNamein interfaceEmulatorEdgeRuntime
-
browserUrl
- Specified by:
browserUrlin interfaceEmulatorEdgeRuntime
-
start
- Specified by:
startin interfaceEmulatorEdgeRuntime- Throws:
IOException
-
stop
- Specified by:
stopin interfaceEmulatorEdgeRuntime- Throws:
IOException
-
rebuild
Description copied from interface:EmulatorEdgeRuntimeRemove container and recreate (same image; refresh bind mounts).- Specified by:
rebuildin interfaceEmulatorEdgeRuntime- Throws:
IOException
-
reload
- Specified by:
reloadin interfaceEmulatorEdgeRuntime- Throws:
IOException
-
reconcile
Description copied from interface:EmulatorEdgeRuntimeRewrite vhosts from Docker publishes and reload if the container is running.- Specified by:
reconcilein interfaceEmulatorEdgeRuntime- Throws:
IOException
-
isRunning
- Specified by:
isRunningin interfaceEmulatorEdgeRuntime- Throws:
IOException
-
isHealthy
public boolean isHealthy()DockerEmulatorSupport.isHttpReachable(URI), notisHttpHealthy-- this is a plain reverse proxy with no default vhost, so an unmatchedGET /404s correctly the moment nginx itself is up, before any application route exists. Requiring 2xx here would report this container unhealthy on every cold start with nothing deployed yet, even though it's already serving traffic correctly.- Specified by:
isHealthyin interfaceEmulatorEdgeRuntime
-