Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Chrisjb/rstudio-dev-docker
Rstudio development environment using docker compose
https://github.com/Chrisjb/rstudio-dev-docker
docker docker-compose nginx plumber-api postgresql r rstudio
Last synced: 3 months ago
JSON representation
Rstudio development environment using docker compose
- Host: GitHub
- URL: https://github.com/Chrisjb/rstudio-dev-docker
- Owner: Chrisjb
- Created: 2020-04-23T22:18:01.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-04-24T01:52:24.000Z (over 4 years ago)
- Last Synced: 2024-06-05T01:48:17.330Z (5 months ago)
- Topics: docker, docker-compose, nginx, plumber-api, postgresql, r, rstudio
- Language: R
- Size: 515 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
- jimsghstars - Chrisjb/rstudio-dev-docker - Rstudio development environment using docker compose (R)
README
# Rstudio with api and postgresql
A containerised Rstudio instance with a linked api and db. An R studio instance will open with postgreSQL and a plumber API already set up and a persistent volume will be set up for postgres storage.![The Rstudio environment running in localhost](config/readme-files/app-screenshot.png)
Rstudio and the plumber API use `nginx` reverse proxy which is accessible on port 5500.
Rstudio is hosted at:
http://localhost:5500/The API can be accessed at:
http://localhost:5500/api/test?x=1&y=2The environment comes with PostgreSQL preconfigured with postgis with connection details in `test-script.R`. The postgres username and password each default to 'postgres' and can be changed in `docker-compose.yaml`.
## Running with docker
1. clone the repo `git clone https://github.com/Chrisjb/rstudio-dev-docker.git`
2. `cd` to our project folder
3. run `docker-compose up`
4. when finished run `docker-compose down`If you see the error:
>Error in postgresqlNewConnection(drv, ...) :
> RS-DBI driver: (could not connect postgres@db:5432 on dbname "dev": could not connect to server: Connection refused
> Is the server running on host "db" (172.26.0.2) and accepting
> TCP/IP connections on port 5432?
>)The database has likely not finished building yet. This can take some time the first time the container is run. The api will also refuse to connect initially for the same reason.