Skip to content

chore: update develop script to start in dev mode #742

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

Merged
merged 1 commit into from
Mar 31, 2022
Merged
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
chore: update develop script
  • Loading branch information
presleyp committed Mar 30, 2022
commit 577f489e41ca372b61eb0ac4c3927318f9040ecd
18 changes: 1 addition & 17 deletions develop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,9 @@

set -euo pipefail

EMAIL="${EMAIL:-admin@coder.com}"
USERNAME="${USERNAME:-admin}"
ORGANIZATION="${ORGANIZATION:-ACME-Corp}"
PASSWORD="${PASSWORD:-password}"
PROJECT_ROOT="$(git rev-parse --show-toplevel)"
cd "${PROJECT_ROOT}"

# Helper to create an initial user
function create_initial_user() {
# TODO: We need to wait for `coderd` to spin up -
# need to replace with a deterministic strategy
sleep 5s

curl -X POST \
-d "{\"email\": \"$EMAIL\", \"username\": \"$USERNAME\", \"organization\": \"$ORGANIZATION\", \"password\": \"$PASSWORD\"}" \
-H 'Content-Type:application/json' \
http://localhost:3000/api/v2/users/first
}

# Run yarn install, to make sure node_modules are ready to go
"$PROJECT_ROOT/scripts/yarn_install.sh"

Expand All @@ -31,5 +15,5 @@ function create_initial_user() {
trap 'kill 0' SIGINT
create_initial_user &
CODERV2_HOST=http://127.0.0.1:3000 yarn --cwd=./site dev &
go run cmd/coder/main.go start
go run cmd/coder/main.go start --dev --tunnel=false
)