Skip to content

Commit

Permalink
make the blueprint a little more practical
Browse files Browse the repository at this point in the history
  • Loading branch information
mbannert committed Nov 22, 2024
1 parent e79d8f0 commit 4d66343
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
services:
postgres:
# a name, e.g., db_container is
# instrumental to be
# called as host from the shiny app
container_name: db_container
image: postgres:latest
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
# This port mapping is only necessary
# to connect from the host,
# not to let containers talk to each other.
ports:
- "5432:5432"
volumes:
- "./pgdata:/var/lib/postgresql/data"
shiny:
container_name: shiny
depends_on:
- postgres
image: rocker/shiny:latest
platform: linux/amd64
volumes:
- "./shiny-logs:/var/log/shiny-server"
- "./shiny-home:/srv/shiny-server"
- "./entrypoint.sh:/entrypoint.sh"
ports:
- "3838:3838"
entrypoint: ["/entrypoint.sh"]
4 changes: 4 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
R -e 'install.packages("shinydashboard")'
exec shiny-server

0 server.R → shiny-home/server.R
100644 → 100755
File renamed without changes.
0 ui.R → shiny-home/ui.R
100644 → 100755
File renamed without changes.

0 comments on commit 4d66343

Please sign in to comment.