From 4cee1752cb24d9c27533aa20e5f837e76aa2f321 Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Wed, 8 Mar 2023 18:53:17 +0000 Subject: [PATCH 1/2] chore: Fix default password and add more docs --- docs/CONTRIBUTING.md | 6 ++++++ docs/contributing/frontend.md | 9 +++++++++ scripts/develop.sh | 3 ++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index 9521121775d2a..af8f0b37c4678 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -73,6 +73,12 @@ Use the following `make` commands and scripts in development: - `make install` installs binaries to `$GOPATH/bin` - `make test` +### Running Coder on development mode + +- Run `./scripts/develop.sh` +- Access `http://localhost:8080` +- The default user is `admin@coder.com` and the default password is `SomeSecurePassword!` + ### Adding database migrations and fixtures #### Database migrations diff --git a/docs/contributing/frontend.md b/docs/contributing/frontend.md index a9484a5660700..349764dab7a7e 100644 --- a/docs/contributing/frontend.md +++ b/docs/contributing/frontend.md @@ -2,6 +2,15 @@ This is a guide to help the Coder community and also Coder members contribute to our UI. It is ongoing work but we hope it provides some useful information to get started. If you have any questions or need help, please send us a message on our [Discord server](https://discord.com/invite/coder). We'll be happy to help you. +## Running the UI + +You can run the UI and access the dashboard in two ways: + +- Build the UI pointing to an external Coder server: `CODER_HOST=https://mycoder.com yarn dev`. This is helpful when you are building something in the UI and already have the data on your deployed server. +- Build the entire Coder server + UI locally: `./scripts/develop.sh`. It is useful when you have to contribute with features that are not deployed yet or when you have to work on both, frontend and backend. + +In both cases, you can access the dashboard on `http://localhost:8080`. If you are running the `./scripts/develop.sh` you can log in using the default credentials: `admin@coder.com` and `SomeSecurePassword!`. + ## Tech Stack All our dependencies are described in `site/package.json` but here are the most important ones: diff --git a/scripts/develop.sh b/scripts/develop.sh index 8f822c16109e2..93696f36f16cc 100755 --- a/scripts/develop.sh +++ b/scripts/develop.sh @@ -13,7 +13,8 @@ source "${SCRIPT_DIR}/lib.sh" [[ -n ${VERBOSE:-} ]] && set -x set -euo pipefail -password="${CODER_DEV_ADMIN_PASSWORD:-password}" +DEFAULT_PASSWORD="SomeSecurePassword!" +password="${CODER_DEV_ADMIN_PASSWORD:-${DEFAULT_PASSWORD}}" args="$(getopt -o "" -l agpl,password: -- "$@")" eval set -- "$args" From 463214d3549191c464eca683dbdc92195631f2ba Mon Sep 17 00:00:00 2001 From: Bruno Quaresma Date: Wed, 8 Mar 2023 19:22:33 +0000 Subject: [PATCH 2/2] Add directories --- docs/contributing/frontend.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/contributing/frontend.md b/docs/contributing/frontend.md index 349764dab7a7e..d7212a4c2083c 100644 --- a/docs/contributing/frontend.md +++ b/docs/contributing/frontend.md @@ -6,8 +6,8 @@ This is a guide to help the Coder community and also Coder members contribute to You can run the UI and access the dashboard in two ways: -- Build the UI pointing to an external Coder server: `CODER_HOST=https://mycoder.com yarn dev`. This is helpful when you are building something in the UI and already have the data on your deployed server. -- Build the entire Coder server + UI locally: `./scripts/develop.sh`. It is useful when you have to contribute with features that are not deployed yet or when you have to work on both, frontend and backend. +- Build the UI pointing to an external Coder server: `CODER_HOST=https://mycoder.com yarn dev` inside of the `site` folder. This is helpful when you are building something in the UI and already have the data on your deployed server. +- Build the entire Coder server + UI locally: `./scripts/develop.sh` in the root folder. It is useful when you have to contribute with features that are not deployed yet or when you have to work on both, frontend and backend. In both cases, you can access the dashboard on `http://localhost:8080`. If you are running the `./scripts/develop.sh` you can log in using the default credentials: `admin@coder.com` and `SomeSecurePassword!`.