update dev deployment to use docker compose

This commit is contained in:
2025-11-30 13:35:47 -05:00
parent 21641273fa
commit 6e77de02de
4 changed files with 142 additions and 6 deletions
+69
View File
@@ -0,0 +1,69 @@
# Git
.git
.gitignore
.github
# Docker
Dockerfile
docker-compose*.yml
.dockerignore
# Documentation
README.md
*.md
docs/
# CI/CD
.github/
# IDE
.vscode/
.idea/
*.swp
*.swo
*~
# OS
.DS_Store
Thumbs.db
# Logs
*.log
logs/
# Temporary files
*.tmp
*.temp
tmp/
temp/
# R specific
.Rhistory
.RData
.Rproj.user
*.Rproj
# Test files
app/test-*.R
**/test-*.R
# Node (if any)
node_modules/
npm-debug.log
# Python (if any)
__pycache__/
*.pyc
*.pyo
.venv/
venv/
# Build artifacts
*.tar.gz
*.zip
dashboard-dev.tar.gz
dashboard-prod.tar.gz
# Caddy (deployment-specific)
docker/caddy/data/
docker/caddy/config/
+4 -6
View File
@@ -39,8 +39,6 @@ RUN R -s -e "renv::restore()"
FROM rocker/shiny:4.5.2
WORKDIR /app
RUN apt-get update && apt-get install -y \
libcurl4 \
libssl3 \
@@ -65,10 +63,10 @@ COPY --chown=shiny:shiny --from=renv-base /app/renv /srv/shiny-server/app/renv
COPY --chown=shiny:shiny --from=renv-base /app/.Rprofile /srv/shiny-server/app/.Rprofile
COPY --chown=shiny:shiny --from=renv-base /app/renv.lock /srv/shiny-server/app/renv.lock
COPY --chown=shiny:shiny dashboard.Rmd /srv/shiny-server/app/index.Rmd
COPY --chown=shiny:shiny queries.R /srv/shiny-server/app/
COPY --chown=shiny:shiny utils.R /srv/shiny-server/app/
COPY --chown=shiny:shiny config.yml /srv/shiny-server/app/
COPY --chown=shiny:shiny app/dashboard.Rmd /srv/shiny-server/app/index.Rmd
COPY --chown=shiny:shiny app/queries.R /srv/shiny-server/app/
COPY --chown=shiny:shiny app/utils.R /srv/shiny-server/app/
COPY --chown=shiny:shiny app/config.yml /srv/shiny-server/app/
COPY --chown=shiny:shiny shiny-server.conf /etc/shiny-server/shiny-server.conf
+47
View File
@@ -0,0 +1,47 @@
version: '3.8'
services:
dashboard:
build:
context: .
dockerfile: Dockerfile
cache_from:
- hurricane-dashboard:renv-base
- hurricane-dashboard:dev
image: hurricane-dashboard:dev
ports:
- "3838:3838"
environment:
- APP_ENV=development
# volumes:
# - ./app/dashboard.Rmd:/srv/shiny-server/app/index.Rmd:ro
# - ./app/queries.R:/srv/shiny-server/app/queries.R:ro
# - ./app/utils.R:/srv/shiny-server/app/utils.R:ro
# - ./app/config.yml:/srv/shiny-server/app/config.yml:ro
restart: unless-stopped
networks:
- app-network
caddy:
image: caddy:2-alpine
ports:
- "80:80"
volumes:
- ./docker/caddy/Caddyfile.dev:/etc/caddy/Caddyfile:ro
- caddy_data:/data
- caddy_config:/config
depends_on:
- dashboard
restart: unless-stopped
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
caddy_data:
driver: local
caddy_config:
driver: local
+22
View File
@@ -0,0 +1,22 @@
{
admin off
auto_https off
}
:80 {
reverse_proxy dashboard:3838 {
transport http {
read_buffer 8192
write_buffer 8192
}
}
header {
X-Dev-Environment "true"
}
log {
output stdout
format console
}
}