-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Flyttet app fra inst-mappe til R-mappe (#24)
* docker-fix * aktiver faner (figurer etc.) * aktivert litt mer
- Loading branch information
Showing
17 changed files
with
584 additions
and
456 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^\.travis\.yml$ | ||
^appveyor\.yml$ | ||
^_pkgdown\.yml$ | ||
^docs$ | ||
^pkgdown$ | ||
^LICENSE\.md$ | ||
^Rprofile.site$ | ||
^Dockerfile$ | ||
^\.lintr$ | ||
^\.github$ | ||
^.*\.Rproj$ | ||
^\.Rproj\.user$ | ||
^_pkgdown\.yml$ | ||
^docs$ | ||
^pkgdown$ | ||
^LICENSE\.md$ | ||
^Rprofile.site$ | ||
^Dockerfile$ | ||
^\.lintr$ | ||
^\.github$ |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: Publish Docker image | ||
on: | ||
release: | ||
types: [published] | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
push_to_registries: | ||
name: Push Docker image to docker hub | ||
runs-on: ubuntu-latest | ||
env: | ||
IMAGE_NAME: ${{ github.repository }} | ||
steps: | ||
- name: Check out the repo | ||
uses: actions/checkout@v4 | ||
- name: R setup | ||
uses: r-lib/actions/setup-r@v2.6.5 | ||
- name: Build package (tarball) | ||
run: R CMD build . | ||
- name: Lint Dockerfile | ||
uses: hadolint/hadolint-action@v3.1.0 | ||
with: | ||
dockerfile: "Dockerfile" | ||
- name: Prepare tags | ||
id: docker_meta | ||
uses: docker/metadata-action@v5.0.0 | ||
with: | ||
images: ${{ env.IMAGE_NAME }} | ||
tags: | | ||
type=ref,event=branch | ||
type=ref,event=pr | ||
type=semver,pattern={{version}} | ||
type=semver,pattern={{major}}.{{minor}} | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3.0.0 | ||
- name: Login to DockerHub | ||
if: github.event_name != 'pull_request' | ||
uses: docker/login-action@v3.0.0 | ||
with: | ||
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
- name: Push to Docker Hub | ||
uses: docker/build-push-action@v5.0.0 | ||
with: | ||
context: . | ||
file: ./Dockerfile | ||
push: ${{ github.event_name != 'pull_request' }} | ||
tags: ${{ steps.docker_meta.outputs.tags }} | ||
labels: ${{ steps.docker_meta.outputs.labels }} | ||
cache-from: type=gha | ||
cache-to: type=gha,mode=max |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ figure | |
inst/shinyApps/app1/*.md | ||
inst/*.md | ||
docs/ | ||
*.tar.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,17 @@ | ||
FROM rocker/r-base | ||
FROM rapporteket/base-r:4.2.1 | ||
|
||
LABEL maintainer "Are Edvardsen <are.edvardsen@helse-nord.no>" | ||
LABEL no.mongr.cd.enable="true" | ||
LABEL maintainer "Arnfinn Hykkerud Steindal <arnfinn.hykkerud.steindal@helse-nord.no>" | ||
|
||
# system libraries of general use | ||
RUN apt-get update && apt-get install -y \ | ||
sudo \ | ||
pandoc \ | ||
pandoc-citeproc \ | ||
libcurl4-gnutls-dev \ | ||
libcairo2-dev \ | ||
libxt-dev \ | ||
libxml2-dev \ | ||
default-jdk \ | ||
libssl-dev \ | ||
libmariadbclient-dev | ||
LABEL no.rapporteket.cd.enable="true" | ||
|
||
# basic R functionality | ||
RUN R -e "install.packages(c('remotes'), repos='https://cloud.r-project.org/')" | ||
WORKDIR /app/R | ||
|
||
# install rapRegTemplate app | ||
RUN R -e "remotes::install_github('Rapporteket/rapRegTemplate')" | ||
# hadolint ignore=DL3010 | ||
COPY *.tar.gz . | ||
|
||
# copy the app to the image | ||
RUN mkdir /root/rapRegTemplate | ||
COPY inst/shinyApps/app1 /root/rapRegTemplate | ||
|
||
COPY Rprofile.site /usr/lib/R/etc/ | ||
RUN R -e "remotes::install_local(list.files(pattern = \"*.tar.gz\"))" \ | ||
&& rm ./*.tar.gz | ||
|
||
EXPOSE 3838 | ||
|
||
CMD ["R", "-e", "shiny::runApp('/root/rapRegTemplate')"] | ||
CMD ["R", "-e", "options(shiny.port = 3838,shiny.host = \"0.0.0.0\"); rapRegTemplate::run_app()"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,10 @@ | ||
# Generated by roxygen2: do not edit by hand | ||
|
||
export("%>%") | ||
export(app_server) | ||
export(app_ui) | ||
export(getFakeRegData) | ||
export(getRegData) | ||
export(makeHist) | ||
export(run_app) | ||
importFrom(magrittr,"%>%") |
Oops, something went wrong.