2022-03-28 20:21:00 +00:00
# Coder
2022-01-04 02:54:27 +00:00
2022-03-28 20:21:00 +00:00
[!["GitHub Discussions" ](https://img.shields.io/badge/%20GitHub-%20Discussions-gray.svg?longCache=true&logo=github&colorB=purple )](https://github.com/coder/coder/discussions) [!["Join us on Slack" ](https://img.shields.io/badge/join-us%20on%20slack-gray.svg?longCache=true&logo=slack&colorB=brightgreen )](https://coder.com/community) [![Twitter Follow ](https://img.shields.io/twitter/follow/CoderHQ?label=%40CoderHQ&style=social )](https://twitter.com/coderhq) [![codecov ](https://codecov.io/gh/coder/coder/branch/main/graph/badge.svg?token=TNLW3OAP6G )](https://codecov.io/gh/coder/coder)
2022-01-03 18:52:07 +00:00
2022-03-28 20:21:00 +00:00
Provision remote development environments with Terraform.
2022-01-04 02:54:27 +00:00
2022-03-28 20:21:00 +00:00
## Highlights
2022-01-03 18:52:07 +00:00
2022-03-28 20:21:00 +00:00
- Automate development environments for Linux, Windows, and MacOS in your cloud
- Start writing code with a single command
- Use one of many [examples ](./examples ) to get started
2022-01-03 18:52:07 +00:00
2022-03-28 20:21:00 +00:00
## Getting Started
2022-01-11 21:05:49 +00:00
2022-03-28 20:21:00 +00:00
Install [the latest release ](https://github.com/coder/coder/releases ).
2022-02-11 04:32:00 +00:00
2022-03-28 20:21:00 +00:00
To tinker, start with dev-mode (all data is in-memory, and is destroyed on exit):
2022-02-09 21:46:46 +00:00
2022-03-28 20:21:00 +00:00
```bash
$ coder start --dev
```
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
To run a production deployment with PostgreSQL:
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
```bash
$ CODER_PG_CONNECTION_URL="postgres://< username > @< host > /< database > ?password=< password > " \
coder start
```
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
To run as a system service, install with `.deb` or `.rpm` :
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
```bash
# Edit the configuration!
$ sudo vim /etc/coder.d/coder.env
$ sudo service coder restart
```
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
### Your First Workspace
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
In a new terminal, create a new project (eg. Develop in Linux on Google Cloud):
2022-02-09 21:46:46 +00:00
2022-03-28 20:21:00 +00:00
```
$ coder projects init
$ coder projects create
```
2022-02-09 21:46:46 +00:00
2022-03-28 20:21:00 +00:00
Create a new workspace and SSH in:
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
```
$ coder workspaces create my-first-workspace
$ coder ssh my-first-workspace
```
2022-03-16 03:55:21 +00:00
2022-03-28 20:21:00 +00:00
## Development
2022-01-11 21:05:49 +00:00
2022-03-28 20:21:00 +00:00
The code structure is inspired by [Basics of Unix Philosophy ](https://homepage.cs.uri.edu/~thenry/resources/unix_art/ch01s06.html ) and [Effective Go ](https://go.dev/doc/effective_go ).
2022-01-11 21:05:49 +00:00
2022-03-28 20:21:00 +00:00
Coder requires Go 1.18+, Node 14+, and GNU Make.
2022-01-11 21:05:49 +00:00
2022-03-28 20:21:00 +00:00
- `make bin` builds binaries
- `make install` installs binaries to `$GOPATH/bin`
- `make test`
- `make release` dry-runs a new release
- `./develop.sh` hot-reloads for frontend development