Skip to content

Commit

Permalink
Merge pull request #30 from Sydney-Informatics-Hub/gitpod
Browse files Browse the repository at this point in the history
Set up gitpod for self-directed training
  • Loading branch information
georgiesamaha authored Oct 9, 2024
2 parents 121097a + 27ca8f8 commit aeb3514
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/.gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Use the Gitpod workspace base image
FROM gitpod/workspace-base

USER root

# Set environment variables
ENV TZ=Australia/Sydney
ENV DEBIAN_FRONTEND=noninteractive

# Set the timezone and install required utilities
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone && \
apt-get update --quiet && \
apt-get install --quiet --yes \
apt-transport-https \
apt-utils \
sudo \
git \
less \
wget \
curl \
tree \
graphviz \
zip \
unzip \
default-jre \
ca-certificates

# Install Nextflow
RUN curl -s https://get.nextflow.io | bash && \
chmod 755 ./nextflow && \
mv ./nextflow /usr/local/bin

# Create .nextflow directory and set proper permissions
RUN mkdir -p /home/gitpod/.nextflow && \
chown -R gitpod:gitpod /home/gitpod/.nextflow

# Change user back to gitpod
USER gitpod

# Set the entrypoint
ENTRYPOINT ["/bin/bash"]
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
results/
work/
site/
.DS_Store
15 changes: 15 additions & 0 deletions .gitpod.code-workspace
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"editor.tabSize": 2,
"files.exclude": {
"**/.git": true,
"**/.DS_Store": true
},
"gitpod.workspaceFolder": "/workspace/hello-nextflow"
}
}
71 changes: 71 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Custom workspace and checkout locations
workspaceLocation: gitpod/gitpod-ws.code-workspace # Refers to your .code-workspace file
checkoutLocation: gitpod

# GitHub prebuild configuration
github:
prebuilds:
# Enable prebuilds for the master/default branch
master: true
# Disable prebuilds for all branches
branches: false
# Enable prebuilds for pull requests from this repo
pullRequests: true
# Enable prebuilds for pull requests from forks
pullRequestsFromForks: true
# Disable "Review in Gitpod" comment on PRs
addComment: false
# Disable "Review in Gitpod" badge on PRs
addBadge: false

# Docker image to use for the workspace
image: .gitpod.Dockerfile

# Tasks to execute during workspace initialisation and startup
tasks:
- before: printf 'unset JAVA_TOOL_OPTIONS\n' >> $HOME/.bashrc && exit

# FOR TESTING: check out workspace in the `gitpod` branch
- name: Checkout gitpod branch
init: |
git fetch origin gitpod # Fetch the latest changes for the gitpod branch
git checkout gitpod || git checkout -b gitpod origin/gitpod # Switch to the gitpod branch
# Create directory structure
- name: Create Directories
init: |
mkdir -p ~/hello-nextflow/part1
mkdir -p ~/hello-nextflow/part2
# Download containers to be used in part 2
- name: Download containers
init: |
docker pull quay.io/biocontainers/salmon:1.10.1--h7e5ed60_0
docker pull quay.io/biocontainers/fastqc:0.12.1--hdfd78af_0
docker pull quay.io/biocontainers/multiqc:1.19--pyhdfd78af_0
command: docker run hello-world

# Open docs in a web browser
- name: Start web server
command: gp ports await 23000 && gp preview https://sydney-informatics-hub.github.io/hello-nextflow/

# Start the tutorial
- name: Start tutorial
command: |
cd hello-nextflow
source $HOME/.bashrc
export PS1='\[\e[3;36m\]${PWD/*\//} ->\[\e[0m\] '
unset JAVA_TOOL_OPTIONS
clear
# VSCode extensions to install in the workspace
vscode:
extensions:
- codezombiech.gitignore # Support for .gitignore files
- cssho.vscode-svgviewer # SVG viewer
- esbenp.prettier-vscode # Prettier for markdown formatting
#- EditorConfig.EditorConfig # Support for .editorconfig
#- Gruntfuggly.todo-tree # Display TODO/FIXME comments in a tree view
- nextflow.nextflow # Nextflow syntax highlighting
- streetsidesoftware.code-spell-checker # Spell checker for source code
- ms-vscode.live-server # Live server for web development

0 comments on commit aeb3514

Please sign in to comment.