Skip to content

Commit 81e9fed

Browse files
committed
update documentation
2 parents 261cff9 + bba5dc6 commit 81e9fed

File tree

407 files changed

+283
-36301
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

407 files changed

+283
-36301
lines changed

.Rbuildignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

.dockerignore

100644100755
Lines changed: 28 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
1-
**/.git
2-
**/.gitignore
1+
# ignore file extensions
2+
*.DS_Store
33
*.Rmd
44
*.html
55
*.md
66
*.Rhistory
7+
*.gitignore
8+
*.Rbuildignore
9+
*.Rproj
10+
11+
# ignore folders
12+
**.git
13+
**.github
14+
**.Rproj.user
715
*docs
8-
docker.compose.yml
16+
*vignettes
17+
*man
18+
*docker
19+
*inst
20+
*data
21+
*pkgdown
22+
23+
# ignore specific files
24+
change_log.txt
25+
MIRA-INSTALL.sh
26+
install_docker.sh
27+
docker-compose.yml
28+
docker-compose-*.yml
29+
_pkgdown.yml
30+
MIRA-INSTALL.sh
31+
MIRA.code-workspace
32+
NAMESPACE
33+

.gitignore

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ scripts/__pycache__/muscle.cpython-37.pyc
1414
*.Rhistory
1515
*.Rbuildignore
1616
*.Rproj
17-
vignettes/*.html
17+
*.Rproj.user
1818

1919
# ignore folders
2020
**/.Rproj.user
2121

22-
23-
.Rproj.user
22+
# ignore specific files
23+
change_log.txt
24+
docker-compose-dev.yml

Dockerfile

Lines changed: 82 additions & 117 deletions
Original file line numberDiff line numberDiff line change
@@ -1,117 +1,82 @@
1-
2-
# Create a build argument
3-
ARG BUILD_STAGE
4-
ARG BUILD_STAGE=${BUILD_STAGE:-prod}
5-
6-
############# Build Stage: Dependencies ##################
7-
8-
# Start from a base image
9-
FROM --platform=linux/amd64 ubuntu:focal as base
10-
11-
# Define a system argument
12-
ARG DEBIAN_FRONTEND=noninteractive
13-
14-
# Install system libraries of general use
15-
RUN apt-get update --allow-releaseinfo-change && apt-get install --no-install-recommends -y \
16-
build-essential \
17-
iptables \
18-
libdevmapper1.02.1 \
19-
python3.7\
20-
python3-pip \
21-
python3-setuptools \
22-
python3-dev \
23-
dpkg \
24-
sudo \
25-
wget \
26-
curl \
27-
dos2unix
28-
29-
############# Build Stage: Development ##################
30-
31-
# Build from the base image for dev
32-
FROM base as dev
33-
34-
# Create working directory variable
35-
ENV WORKDIR=/data
36-
37-
# Create a stage enviroment
38-
ENV STAGE=dev
39-
40-
############# Build Stage: Production ##################
41-
42-
# Build from the base image for prod
43-
FROM base as prod
44-
45-
# Create working directory variable
46-
ENV WORKDIR=/data
47-
48-
# Create a stage enviroment
49-
ENV STAGE=prod
50-
51-
# Copy all scripts to docker images
52-
COPY . /MIRA
53-
54-
############# Build Stage: Final ##################
55-
56-
# Build the final image
57-
FROM ${BUILD_STAGE} as final
58-
59-
# Set up volume directory in docker
60-
VOLUME ${WORKDIR}
61-
62-
# Set up working directory in docker
63-
WORKDIR ${WORKDIR}
64-
65-
# Allow permission to read and write files to current working directory
66-
RUN chmod -R a+rwx ${WORKDIR}
67-
68-
############# Install Docker ##################
69-
70-
# Copy all files to docker images
71-
COPY docker /MIRA/docker
72-
73-
# Copy all files to docker images
74-
COPY install_docker.sh /MIRA/install_docker.sh
75-
76-
# Convert bash script from Windows style line endings to Unix-like control characters
77-
RUN dos2unix /MIRA/install_docker.sh
78-
79-
# Allow permission to excute the bash script
80-
RUN chmod a+x /MIRA/install_docker.sh
81-
82-
# Execute bash script to install the package
83-
RUN bash /MIRA/install_docker.sh
84-
85-
############# Install python packages ##################
86-
87-
# Copy python requirements file to docker images
88-
COPY requirements.txt /MIRA/requirements.txt
89-
90-
# Install python requirements
91-
RUN pip3 install --no-cache-dir -r /MIRA/requirements.txt
92-
93-
############# Launch MIRA dashboard ##################
94-
95-
# Copy all files to docker images
96-
COPY dashboard-kickoff /MIRA/dashboard-kickoff
97-
98-
# Convert bash script from Windows style line endings to Unix-like control characters
99-
RUN dos2unix /MIRA/dashboard-kickoff
100-
101-
# Allow permission to excute the bash scripts
102-
RUN chmod a+x /MIRA/dashboard-kickoff
103-
104-
# Allow permission to read and write files to MIRA directory
105-
RUN chmod -R a+rwx /MIRA
106-
107-
# Make the app available at port 8050
108-
EXPOSE 8050
109-
110-
# Clean up
111-
RUN apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*
112-
113-
# Export bash script to path
114-
ENV PATH "$PATH:/MIRA"
115-
116-
# Execute the pipeline
117-
ENTRYPOINT ["bash", "dashboard-kickoff"]
1+
# Create an argument to pull a particular version of dias image
2+
ARG spyne_image
3+
ARG spyne_image=${spyne_image:-cdcgov/spyne:latest}
4+
5+
############# spyne image as base ##################
6+
FROM ${spyne_image} as spyne
7+
RUN echo "Getting spyne image"
8+
9+
# local apt mirror support
10+
# start every stage with updated apt sources
11+
ARG APT_MIRROR_NAME=
12+
RUN if [ -n "$APT_MIRROR_NAME" ]; then sed -i.bak -E '/security/! s^https?://.+?/(debian|ubuntu)^http://'"$APT_MIRROR_NAME"'/\1^' /etc/apt/sources.list && grep '^deb' /etc/apt/sources.list; fi
13+
14+
# Install and update system libraries of general use
15+
RUN apt-get update --allow-releaseinfo-change --fix-missing \
16+
&& apt-get install --no-install-recommends -y \
17+
build-essential \
18+
iptables \
19+
python3.7 \
20+
python3-pip \
21+
python3-setuptools \
22+
dos2unix
23+
24+
# Create a working directory variable
25+
ENV WORKDIR=/data
26+
27+
# Set up volume directory
28+
VOLUME ${WORKDIR}
29+
30+
# Set up working directory
31+
WORKDIR ${WORKDIR}
32+
33+
# Create a program variable
34+
ENV MIRA_PROGRAM_DIR=/MIRA
35+
36+
# Set up volume directory
37+
VOLUME ${MIRA_PROGRAM_DIR}
38+
39+
# Copy all scripts to docker images
40+
COPY . ${MIRA_PROGRAM_DIR}
41+
42+
############# Install python packages ##################
43+
44+
# Copy python requirements file to docker images
45+
COPY requirements.txt ${MIRA_PROGRAM_DIR}/requirements.txt
46+
47+
# Install python requirements
48+
RUN pip3 install --no-cache-dir -r ${MIRA_PROGRAM_DIR}/requirements.txt
49+
50+
############# Launch MIRA dashboard ##################
51+
52+
# Copy all files to docker images
53+
COPY dashboard-kickoff ${MIRA_PROGRAM_DIR}/dashboard-kickoff
54+
55+
# Convert bash script from Windows style line endings to Unix-like control characters
56+
RUN dos2unix ${MIRA_PROGRAM_DIR}/dashboard-kickoff
57+
58+
# Allow permission to excute the bash scripts
59+
RUN chmod a+x ${MIRA_PROGRAM_DIR}/dashboard-kickoff
60+
61+
# Allow permission to read and write files to MIRA directory
62+
RUN chmod -R a+rwx ${MIRA_PROGRAM_DIR}
63+
64+
# Make the app available at port 8050
65+
EXPOSE 8050
66+
67+
# Clean up and remove unwanted files
68+
RUN apt-get autoremove -y \
69+
&& apt-get clean -y \
70+
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
71+
72+
# Export dais-ribosome script to path
73+
ENV PATH "$PATH:/dais-ribosome"
74+
75+
# Export irma script to path
76+
ENV PATH "$PATH:/flu-amd"
77+
78+
# Export spyne script to path
79+
ENV PATH "$PATH:/spyne"
80+
81+
# Execute the pipeline
82+
ENTRYPOINT ["/bin/bash", "-c", "/MIRA/dashboard-kickoff"]

Dockerfile.dev

Lines changed: 0 additions & 103 deletions
This file was deleted.

0 commit comments

Comments
 (0)