Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: adds Gitpod Flex support #34916

Merged
merged 7 commits into from
Jan 21, 2025
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
41 changes: 41 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
FROM mcr.microsoft.com/vscode/devcontainers/base:ubuntu

COPY package.json /tmp/package.json

RUN apt-get update && apt-get install -y \
apt-transport-https \
build-essential \
ca-certificates \
curl \
jq \
libssl-dev && \
rm -rf /var/lib/apt/lists/*

ENV NVM_DIR /usr/local/nvm
RUN mkdir -p $NVM_DIR && \
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \
bash -c ". $NVM_DIR/nvm.sh && nvm install $(jq -r '.engines.node' /tmp/package.json) && npm install -g yarn"

RUN echo "export NVM_DIR=$NVM_DIR" >> /etc/bash.bashrc && \
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && \. \"$NVM_DIR/nvm.sh\"" >> /etc/bash.bashrc

ENV DENO_INSTALL=/usr/local/deno
RUN mkdir -p $DENO_INSTALL && \
curl -fsSL https://deno.land/install.sh | sh

ENV DENO_INSTALL="/usr/local/deno"
ENV PATH="$DENO_INSTALL/bin:$PATH"

RUN echo 'export DENO_INSTALL="/usr/local/deno"' >> /etc/bash.bashrc && \
echo 'export PATH="$DENO_INSTALL/bin:$PATH"' >> /etc/bash.bashrc

ENV METEOR_INSTALL="/usr/local/meteor"
ENV PATH="$METEOR_INSTALL/bin:$PATH"

RUN curl https://install.meteor.com/ | sh && \
mv ~/.meteor $METEOR_INSTALL

RUN echo 'export METEOR_INSTALL="/usr/local/meteor"' >> /etc/bash.bashrc && \
echo 'export PATH="$METEOR_INSTALL/bin:$PATH"' >> /etc/bash.bashrc

CMD ["bash"]
18 changes: 18 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "Rocket.Chat Gitpod",
"build": {
"context": "..",
"dockerfile": "./Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
},
"forwardPorts": [3000],
"customizations": {
"vscode": {
"extensions": [
"esbenp.prettier-vscode"
]
}
}
}
File renamed without changes.
15 changes: 15 additions & 0 deletions .gitpod/automations.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
services:
development-server:
name: Rocket.Chat development server
description: Starts the Rocket.Chat development server (yarn dsv)
triggeredBy:
- postDevcontainerStart
- manual
commands:
start: |
yarn
yarn dsv
ready: |
export ROOT_URL=$(gitpod environment port open 3000 --name "Rocket.Chat application" | sed 's|https://||')
echo $ROOT_URL
gitpod environment port open 3000 --name "Rocket.Chat application"
Loading