forked from remix-run/indie-stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Configure Gitpod for one-click quickstart (remix-run#58)
Co-authored-by: Kent C. Dodds <[email protected]>
- Loading branch information
1 parent
cd77fda
commit e4c669c
Showing
3 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM gitpod/workspace-full | ||
|
||
# Install Fly | ||
RUN curl -L https://fly.io/install.sh | sh | ||
ENV FLYCTL_INSTALL="/home/gitpod/.fly" | ||
ENV PATH="$FLYCTL_INSTALL/bin:$PATH" | ||
|
||
# Install GitHub CLI | ||
RUN brew install gh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# https://www.gitpod.io/docs/config-gitpod-file | ||
|
||
image: | ||
file: .gitpod.Dockerfile | ||
|
||
ports: | ||
- port: 3000 | ||
onOpen: notify | ||
|
||
tasks: | ||
- name: Restore .env file | ||
command: | | ||
if [ -f .env ]; then | ||
# If this workspace already has a .env, don't override it | ||
# Local changes survive a workspace being opened and closed | ||
# but they will not persist between separate workspaces for the same repo | ||
echo "Found .env in workspace" | ||
else | ||
# There is no .env | ||
if [ ! -n "${ENV}" ]; then | ||
# There is no $ENV from a previous workspace | ||
# Default to the example .env | ||
echo "Setting example .env" | ||
cp .env.example .env | ||
else | ||
# After making changes to .env, run this line to persist it to $ENV | ||
# eval $(gp env -e ENV="$(base64 .env | tr -d '\n')") | ||
# | ||
# Environment variables set this way are shared between all your workspaces for this repo | ||
# The lines below will read $ENV and print a .env file | ||
echo "Restoring .env from Gitpod" | ||
echo "${ENV}" | base64 -d | tee .env > /dev/null | ||
fi | ||
fi | ||
- init: npm install | ||
command: npm run setup && npm run dev | ||
|
||
vscode: | ||
extensions: | ||
- ms-azuretools.vscode-docker | ||
- esbenp.prettier-vscode | ||
- dbaeumer.vscode-eslint | ||
- bradlc.vscode-tailwindcss |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters