You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To get started with Coder, the easiest way to set up the required environment is to use the provided [Nix environment](https://github.com/coder/coder/tree/main/nix).
8
+
Learn more [how Nix works](https://nixos.org/guides/how-nix-works).
9
9
10
10
### Nix
11
11
@@ -56,37 +56,9 @@ We recommend that you use [Nix](https://nix.dev/) package manager to
56
56
57
57
### Without Nix
58
58
59
-
Alternatively if you do not want to use Nix then you'll need to install the need
60
-
the following tools by hand:
61
-
62
-
- Go 1.18+
63
-
- on macOS, run `brew install go`
64
-
- Node 14+
65
-
- on macOS, run `brew install node`
66
-
- GNU Make 4.0+
67
-
- on macOS, run `brew install make`
68
-
-[`shfmt`](https://github.com/mvdan/sh#shfmt)
69
-
- on macOS, run `brew install shfmt`
70
-
-[`nfpm`](https://nfpm.goreleaser.com/install)
71
-
- on macOS, run `brew install goreleaser/tap/nfpm && brew install nfpm`
If you're not using the Nix environment, you can launch a local [DevContainer](https://github.com/coder/coder/tree/main/.devcontainer) to get a fully configured development environment.
60
+
61
+
DevContainers are supported in tools like **VS Code** and **GitHub Codespaces**, and come preloaded with all required dependencies: Docker, Go, Node.js with `pnpm`, and `make`.
90
62
91
63
</div>
92
64
@@ -101,19 +73,40 @@ Use the following `make` commands and scripts in development:
101
73
102
74
### Running Coder on development mode
103
75
104
-
- Run `./scripts/develop.sh`
105
-
- Access `http://localhost:8080`
106
-
- The default user is `admin@coder.com` and the default password is
107
-
`SomeSecurePassword!`
76
+
1. Run the development script to spin up the local environment:
77
+
78
+
```sh
79
+
./scripts/develop.sh
80
+
```
81
+
82
+
This will start two processes:
83
+
84
+
-http://localhost:3000 — the backend API server. Primarily used for backend development and also serves the *static* frontend build.
85
+
-http://localhost:8080 — the Node.js frontend development server. Supports *hot reloading* and is useful if you're working on the frontend as well.
86
+
87
+
Additionally, it starts a local PostgreSQL instance, creates both an admin and a member user account, and installs a default Docker-based template.
88
+
89
+
1. Verify Your Session
108
90
109
-
### Running Coder using docker-compose
91
+
Confirm that you're logged in by running:
110
92
111
-
This mode is useful for testing HA or validating more complex setups.
93
+
```sh
94
+
./scripts/coder-dev.sh list
95
+
```
112
96
113
-
- Generate a new image from your HEAD: `make build/coder_$(./scripts/version.sh)_$(go env GOOS)_$(go env GOARCH).tag`
114
-
- This will output the name of the new image, e.g.: `ghcr.io/coder/coder:v2.19.0-devel-22fa71d15-amd64`
115
-
- Inject this image into docker-compose: `CODER_VERSION=v2.19.0-devel-22fa71d15-amd64 docker-compose up` (*note the prefix `ghcr.io/coder/coder:` was removed*)
116
-
- To use Docker, determine your host's `docker` group ID with `getent group docker | cut -d: -f3`, then update the value of `group_add` and uncomment
97
+
This should return an empty list of workspaces. If you encounter an error, review the output from the [develop.sh](https://github.com/coder/coder/blob/main/scripts/develop.sh) script for issues.
98
+
99
+
>`coder-dev.sh` is a helper script that behaves like the regular coder CLI, but uses the binary built from your localsource and shares the same configuration directory set up by `develop.sh`. This ensures your local changes are reflected when testing.
100
+
>
101
+
> The default user is `admin@coder.com` and the default password is `SomeSecurePassword!`
102
+
103
+
1. Create Your First Workspace
104
+
105
+
A template named `docker` is created automatically. To spin up a workspace quickly, use:
0 commit comments