knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
Testing the deployment of a golem app on Heroku
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")
Alternative: 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}
xdg-open http://localhost:5001
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.