Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
image:
file: ./devops/gitpod.dockerfile
tasks:
- init: npm install && RScript -e "blogdown::install_hugo()"
- command: "echo 'run: \"npm start\" or \"npm run start:blog\"'"
ports:
- port: 1313
vscode:
extensions:
- [email protected]:SrD06skfmg05hLAerl2aKQ==
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Delphi Website

[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cmu-delpih/www-main)


Delphi's homepage at https://cmu-delphi-main.netlify.app/

This site is based on [Hugo](https://gohugo.io) and uses [Prettier](https://prettier.io) for formatting.
Expand Down Expand Up @@ -38,9 +41,9 @@ In RMarkdown things are slightly more different since the R Markdown parser is u
**Examples**

```
[Facebook](`r blogdown::shortcode_html("ref", "2020-08-26-fb-survey")`)
[previous exploratory investigations](`r blogdown::shortcode_html("ref", "2020-08-26-fb-survey#some-interesting-examples")`)
[public API](`r blogdown::shortcode_html("apiref", "api/covidcast.html")`)
`r blogdown::shortcode_html("reflink", "2020-08-26-fb-survey", "Facebook")`
`r blogdown::shortcode_html("reflink", "2020-08-26-fb-survey#some-interesting-examples", "previous exploratory investigations")`
`r blogdown::shortcode_html("apireflink", "api/covidcast.html", "public API")`

```

Expand All @@ -53,6 +56,8 @@ In addition, there in the `/data` directory there are the following listings in

## Development Environment

One click: [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/cmu-delpih/www-main)

### Web Editor Only

1. Install Node: https://nodejs.org/en/download/
Expand Down
27 changes: 27 additions & 0 deletions devops/gitpod.dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# docker image for setting up an R environment
FROM gitpod/workspace-full

# install miniconda
ENV PATH /opt/conda/bin:$PATH
RUN wget --quiet https://repo.anaconda.com/miniconda/Miniconda2-4.7.12-Linux-x86_64.sh -O ~/miniconda.sh && \
sudo /bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.sh && \
sudo ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh && \
echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc && \
echo "conda activate base" >> ~/.bashrc && \
sudo /opt/conda/bin/conda install --name base --channel conda-forge mamba=* && \
sudo find /opt/conda/ -follow -type f -name '*.a' -delete && \
sudo find /opt/conda/ -follow -type f -name '*.js.map' -delete && \
sudo /opt/conda/bin/conda clean -afy && \
conda config --prepend envs_dirs $HOME/.conda/envs && \
conda config --prepend pkgs_dirs $HOME/.conda/pkgs

ADD ./environment.yml .
RUN mamba env create -f environment.yml

ADD ./dependencies.R .

RUN conda run -n www-main Rscript ./dependencies.R

RUN echo "conda activate www-main" >> ~/.bashrc
ENV PATH /home/gitpod/.conda/envs/www-main/bin:$PATH
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"build:blog": "Rscript -e \"blogdown::build_site(local=FALSE, run_hugo=FALSE, build_rmd='md5sum')\"",
"build": "hugo --gc --minify",
"start": "hugo server -D",
"start:blog": "Rscript -e \"blogdown::serve_site()\"",
"start:blog": "Rscript -e \"blogdown::serve_site(port=1313, browser=FALSE)\"",
"format": "prettier *.* \"(.vscode|content|data|themes)/**\" --write",
"lint": "prettier *.* \"(.vscode|content|data|themes)/**\" --check",
"image": "docker build -t www-main:latest --file ./devops/Dockerfile ."
Expand Down