forked from forem/forem
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automated DEV setup using Gitpod (forem#2321)
- Loading branch information
1 parent
3b4bda8
commit 6bc248e
Showing
3 changed files
with
36 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,6 @@ | ||
FROM gitpod/workspace-postgres | ||
|
||
# Install Ruby | ||
COPY .ruby-version /tmp | ||
RUN bash -lc "rvm install ruby-$(cat /tmp/.ruby-version)" \ | ||
&& rm -f /tmp/* |
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,24 @@ | ||
image: | ||
file: .gitpod.dockerfile | ||
ports: | ||
- port: 3000 | ||
onOpen: open-preview | ||
- port: 3035 | ||
onOpen: ignore | ||
- port: 5432 | ||
onOpen: ignore | ||
tasks: | ||
- init: > | ||
cp config/sample_application.yml config/application.yml && | ||
bin/setup 2>/dev/null | ||
command: > | ||
while [ -z "${ALGOLIASEARCH_APPLICATION_ID:=$(cat config/application.yml | grep ALGOLIASEARCH_APPLICATION_ID | sed 's/.*:\s*//')}" ] || | ||
[ -z "${ALGOLIASEARCH_SEARCH_ONLY_KEY:=$(cat config/application.yml | grep ALGOLIASEARCH_SEARCH_ONLY_KEY | sed 's/.*:\s*//')}" ] || | ||
[ -z "${ALGOLIASEARCH_API_KEY:=$(cat config/application.yml | grep ALGOLIASEARCH_API_KEY | sed 's/.*:\s*//')}" ] ; do | ||
gp open config/application.yml 2>/dev/null && | ||
printf "\n❗ Dev.to requires free Algolia credentials.\n" && | ||
printf "❗ To get them, please follow https://docs.dev.to/get-api-keys-dev-env/#algolia\n\n" && | ||
read -p "Add them to config/application.yml, save the file, and press any key to continue... " -n 1 -r | ||
done ; | ||
bin/setup && | ||
bin/startup |
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