Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ destroyed on exit):
> Use `coder --help` to get a complete list of flags and environment
variables.

See the [installation guide](install.md) for additional ways to deploy Coder.

## Creating your first template and workspace

In a new terminal window, run the following to copy a sample template:
Expand Down
96 changes: 96 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Install

This article walks you through the various ways of installing and deploying Coder.

## Docker Compose

Before proceeding, please ensure that you have Docker installed.

1. Clone the `coder` repository:

```console
git clone git@github.com:coder/coder.git
```

1. Navigate into the `coder` folder. Coder requires a non-`localhost` access URL
for non-Docker-based examples; if you have a public IP or a domain/reverse
proxy, you can provide this value before running `docker-compose up` to
start the service:

```console
cd coder
CODER_ACCESS_URL=https://coder.mydomain.com
docker-compose up
```

Otherwise, you can start the service:

```console
cd coder
docker-compose up
```

Alternatively, if you would like to start a **temporary deployment**:

```console
docker run --rm -it \
-e CODER_DEV_MODE=true \
-v /var/run/docker.sock:/var/run/docker.sock \
ghcr.io/coder/coder:v0.5.10
```

1. Open a new terminal window, and run `coder login <yourAccessURL>` to create
your first user (once you've done so, you can navigate to `yourAccessURL` and
log in with these credentials).

1. Next, copy a sample template into a new directory so that you can create a custom template in a
subsequent step (be sure that you're working in the directory where you want
your templates stored):

```console
coder templates init
```

1. Navigate into the new directory and create a new template:

```console
cd ./docker-local && coder templates create
```

Follow the prompts displayed to proceed. When done, you'll see the following
message:

```console
The docker-local template has been created! Developers can
provision a workspace with this template using:

coder create --template="docker-local" [workspace name]
```

1. At this point, you're ready to provision your first workspace:

```console
coder create --template="docker-local" <yourWorkspaceName>
```

Follow the on-screen prompts to set the parameters for your workspace. If
the process is successful, you'll get information regarding your workspace:

```console
┌─────────────────────────────────────────────────────────────────┐
│ RESOURCE STATUS ACCESS │
├─────────────────────────────────────────────────────────────────┤
│ docker_container.workspace ephemeral │
│ └─ dev (linux, amd64) ⦾ connecting [0s] coder ssh main │
├─────────────────────────────────────────────────────────────────┤
│ docker_volume.coder_volume ephemeral │
└─────────────────────────────────────────────────────────────────┘
The main workspace has been created!
```

You can now access your workspace via your web browser by navigating to your
access URL, or you can connect to it via ssh by running:

```console
coder ssh main
```