knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>",
  fig.path = "man/figures/README-",
  out.width = "100%"
)

golem.test

Testing the deployment of a golem app on Heroku

Installation

You can install the development version of golem.test from GitHub with:

# install.packages("devtools")
devtools::install_github("bkm-consultants/golem-test")

In case you are using renv

# install.packages("renv")
# renv::activate()
renv::install("bkm-consultants/golem-test")

[Dev] Building Docker image and running the container locally

Prerequisites

Linux (Ubuntu)

Docker Engine

Alternative: Docker Desktop

macOS

Docker Desktop

Windows

  1. Windows Subsystem for Linux (WSL/WSL2)
  2. Docker Desktop

Build Docker image

```{bash, eval=FALSE} docker buildx build --platform linux/amd64 -t golem-test .

Run container

```{bash, eval=FALSE}
docker run -d --rm --name golem-test -e PORT=3838 -p 3838:3838 golem-test

Open browser

```{bash, eval=FALSE}

Linux/Windows via WSL

xdg-open http://localhost:5001

macOS

open http://localhost:5001

## [Staging] Deployment on [Heroku](heroku.com/)

Login to container registry

```{bash eval=FALSE}
heroku container:login

Ensure that the stack of the app is set to container

```{bash eval=FALSE} heroku stack:set container -a golem-test-staging

Build the image and push to container registry

```{bash eval=FALSE}
heroku container:push -a golem-test-staging web

Release the image to your app

```{bash eval=FALSE} heroku container:release -a golem-test-staging web

Open website

```{bash eval=FALSE}
heroku open

Check the logs

```{bash eval=FALSE} heroku logs -a golem-test-staging

## [Prod] Deployment on [Heroku](heroku.com/)

Login to container registry

```{bash eval=FALSE}
heroku container:login

Ensure that the stack of the app is set to container

```{bash eval=FALSE} heroku stack:set container -a golem-test

Build the image and push to container registry

```{bash eval=FALSE}
heroku container:push -a golem-test web

Release the image to your app

```{bash eval=FALSE} heroku container:release -a golem-test web

Open website

```{bash eval=FALSE}
heroku open

Check the logs

{bash eval=FALSE} heroku logs -a golem-test



rappster/golemtest documentation built on July 21, 2022, 6:38 a.m.