Update Gitpod's setup (#20026)

This commit is contained in:
Mac Siri 2023-09-07 16:36:56 -04:00 committed by GitHub
parent 6b996cfc61
commit 1084179579
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 47 deletions

View file

@ -1,26 +0,0 @@
FROM gitpod/workspace-postgres
# Install the GitHub CLI
RUN brew install gh
# Install Ruby
ENV RUBY_VERSION=3.1.4
RUN printf "rvm_gems_path=/home/gitpod/.rvm\n" > ~/.rvmrc \
&& bash -lc "rvm reinstall $RUBY_VERSION && \
rvm use $RUBY_VERSION --default" \
&& printf "rvm_gems_path=/workspace/.rvm" > ~/.rvmrc \
&& printf "{ rvm use \$(rvm current); } >/dev/null 2>&1\n" >> "$HOME/.bashrc.d/70-ruby"
# Install Node and Yarn
ENV NODE_VERSION=16.13.1
RUN bash -c ". .nvm/nvm.sh && \
nvm install ${NODE_VERSION} && \
nvm alias default ${NODE_VERSION} && \
npm install -g yarn"
ENV PATH=/home/gitpod/.nvm/versions/node/v${NODE_VERSION}/bin:$PATH
# Install Redis.
RUN sudo apt-get update \
&& sudo apt-get install -y \
redis-server \
&& sudo rm -rf /var/lib/apt/lists/*

View file

@ -1,6 +1,3 @@
image:
file: .gitpod.dockerfile
ports:
- port: 3000
onOpen: ignore
@ -12,25 +9,29 @@ ports:
onOpen: ignore
tasks:
- name: Forem Server
before: >
redis-server &
gp ports await 5432 &&
sleep 1
init: ./gitpod-init.sh
command: bin/startup
- name: Open Site
command: >
gp ports await 3000 &&
printf "Waiting for local Forem development environment to load in the browser..." &&
gp preview $(gp url 3000)
gp preview $(gp url 3000) &&
exit
- name: Forem Server
before: |
cp .env_sample .env
echo "APP_DOMAIN=\"$(gp url 3000 | cut -f 3 -d /)\"" >> .env
echo 'APP_PROTOCOL="https://"' >> .env
echo 'COMMUNITY_NAME="DEV(Gitpod)"' >> .env
gem install dip
gem install solargraph
init: dip provision
command: dip up web
github:
prebuilds:
# enable for the master/default branch (defaults to true)
master: true
# enable for all branches in this repo (defaults to false)
branches: true
branches: false
# enable for pull requests coming from this repo (defaults to true)
pullRequests: true
# enable for pull requests coming from forks (defaults to false)

View file

@ -1,9 +0,0 @@
#!/usr/bin/env bash
ln -s "$(which ruby)" "$(rvm gemdir)/bin/ruby"
cp .env_sample .env
echo "APP_DOMAIN=\"$(gp url 3000 | cut -f 3 -d /)\"" >> .env
echo 'APP_PROTOCOL="https://"' >> .env
gem install solargraph
gem install foreman
bin/setup