mirror of
https://github.com/dylanbenzi/hurricane_normalization_app.git
synced 2026-07-29 21:01:27 +00:00
update dev deployment to use docker compose
This commit is contained in:
@@ -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
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user