Plugins

Integrations

Docker

Overview

ReNative has the ability to deploy your website made with rnv to Docker hub or export it to a Docker container.

The files are exported to platformBuilds/xxxxx_web/export/docker.

The app is served by an nginx server over HTTP and HTTPS using a self signed cert that's generated when the image is built. For the moment there is no support for custom certs or Let's Encrypt but they will be added in the future.

The export contains 2 compose files. If you don't want to import the tar containing the built image you can rename the docker-compose.build.yml to docker-compose.yml and use that one with docker-compose up -d. Keep in mind that you need an internet connection in this case since it tries to pull the base image from DockerHub.

However, if you are just trying to test out the feature on the same machine that you ran rnv export or rnv deploy you can directly run docker-compose up -d without any changes because you already have the image with the correct tag in your docker instance.

Commands

rnv deploy -p web -t docker - same as above but also publish it to DockerHub. It will tag the image with 2 tags, one is the app's version and one is latest. This way you will have a history of all the versions and a latest one.

Advanced usage

Offline usage

On systems without internet connection or no access to DockerHub you can import the .tar file and run it, since the tar contains all the layers needed for the image.

docker load --input xx.tar

docker-compose up -d

Always use the docker-compose file exported with .tar file, don't try to use an older version because it will not work. Every docker-compose file has the app's version hardcoded as the image tag.

Healthcheck probe

You can also instruct rnv to add an empty healthcheck file into the container (testprobe.html) that you can ping with your load balancer.

You can do that by adding the following flag into your appConfigs/xxx/renative.json file: