Skip to content

Add docs for packages #24

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 9 commits into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ updates:
directory: "heroku"
schedule:
interval: "daily"

- package-ecosystem: "docker"
directory: "render"
schedule:
interval: "daily"
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Install [Coder](https://github.com/coder/coder) to your preferred cloud with a p
| <img src="./assets/ec2.svg" alt="AWS EC2 Logo" width="100" height="100" /> | AWS EC2 | Live ✅ | [Quickstart: AWS](https://coder.com/docs/v2/latest/quickstart/aws) | [Deploy from AWS Marketplace](https://aws.amazon.com/marketplace/pp/prodview-5gxjyur2vc7rg?sr=0-2&ref_=beagle&applicationId=AWSMPContessa) |
| <img src="./assets/fly.io.svg" alt="Fly.io Logo" width="100" height="100" /> | Fly.io | Live ✅ | [Blog: Run Coder on Fly.io](https://coder.com/blog/remote-developer-environments-on-fly-io) | [Deploy Coder on FLy.io](https://coder.com/blog/remote-developer-environments-on-fly-io) |
| <img src="./assets/railway.svg" alt="Railway.app Logo" width="100" height="100" /> | Railway.app | Live ✅ | [Blog: Run Coder on Railway.app](https://coder.com/blog/deploy-coder-on-railway-app) | [![Deploy Coder on Railway](https://railway.app/button.svg)](https://railway.app/template/cUQ8_P?referralCode=tfH8Uw) |
| <img src="./assets/heroku.svg" alt="Heroku Logo" width="100" height="100" /> | Heroku | Live ✅ | | [![Deploy Coder on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coder/packages) |
| <img src="./assets/heroku.svg" alt="Heroku Logo" width="100" height="100" /> | Heroku | Live ✅ | [Docs: Deploy Coder on Heroku](./heroku/README.md) | [![Deploy Coder on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coder/packages) |
| <img src="./assets/render.png" alt="Render.com Logo" width="100" height="100" /> | Render | Live ✅ | [Docs: Deploy Coder on Render](./render/README.md) | [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/coder/packages) |
| <img src="./assets/eks.svg" alt="AWS EKS Logo" width="100" height="100" /> | AWS EKS | In progress | [Docs: Coder on Kubernetes](https://coder.com/docs/v2/latest/install/kubernetes) | [Deploy from AWS Marketplace](https://example.com) |
| <img src="./assets/gce.svg" alt="Google Compute Engine logo" width="100" height="100" /> | Google Compute Engine | Considering | [Guide: Google Compute Engine](https://coder.com/docs/v2/latest/platforms/google-cloud-platform) | |
Binary file added assets/render.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
50 changes: 50 additions & 0 deletions heroku/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Coder on Heroku

## Deploying a Coder instance to Heroku

### Prerequisites

- A Heroku account
- Heroku CLI installed

### Steps

1. Create a new Heroku app by using our deploy button below. This will automatically create a new app and deploy the latest version of Coder to it along with a basic postgres database.

[![Deploy Coder on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coder/packages)

2. Enable dyno metadata by running the following command in the terminal:

```bash
heroku labs:enable runtime-dyno-metadata -a <app-name>
```

Replace `<app-name>` with the name of your Heroku app.

> **Note:** `HEROKU_APP_NAME` is required by Coder to configure the `CODER_ACCESS_URL` environment variable. This is made available by enabling dyno metadata.

3. Clone the repository to your local machine and connect it to your Heroku app by running the following commands in the terminal:

```bash
git clone https://githib.com/coder/packages
heroku git:remote -a <app-name>
```

Replace `<app-name>` with the name of your Heroku app.

## Updating Coder

If you want to update Coder to the latest version, you can redeploy your app by running the following command from the root of your repository:

```bash
git pull origin main
git push heroku main
```

Replace `<app-name>` with the name of your Heroku app.

## Next steps

- Check out our [documentation](https://coder.com/docs) to learn how to configure your Coder instance.

- You can add environment variables to an Heroku app by going to the app's settings page and clicking on the "Reveal Config Vars" button.
22 changes: 22 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Coder Service
services:
- type: web
name: coder
env: docker
autoDeploy: false
plan: starter
rootDir: render
envVars:
- key: CODER_PG_CONNECTION_URL
fromDatabase:
name: coder
property: connectionString
- key: RENDER_HOST
fromService:
name: coder
type: web
property: host
# Postgres Database
databases:
- name: coder
postgresMajorVersion: 15
6 changes: 6 additions & 0 deletions render/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ghcr.io/coder/coder:v0.22.2
ARG RENDER_HOST
ENV CODER_HTTP_ADDRESS=0.0.0.0:3000
ENV CODER_ACCESS_URL=https://${RENDER_HOST}.onrender.com
ENV CODER_EXPERIMENTS=*
ENV CODER_TELEMETRY_INSTALL_SOURCE=render
62 changes: 62 additions & 0 deletions render/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
[Coder](https://coder.com) enables organizations to set up development environments in the cloud. Environments are defined with Terraform, connected through a secure high-speed Wireguard® tunnel, and are automatically shut down when not in use to save on costs. Coder gives engineering teams the flexibility to use the cloud for workloads that are most beneficial to them.

- Define development environments in Terraform
- EC2 VMs, Kubernetes Pods, Docker Containers, etc.
- Automatically shutdown idle resources to save on costs
- Onboard developers in seconds instead of days

## Quickstart

### 1. Deploy using the Deploy on Render Button

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/coder/packages)

### 2. Create your first user

Create your first user by going to `https://app-name.onrender.com` or your custom domain.

![Set up first user](https://user-images.githubusercontent.com/10648092/231393279-78a7eb27-ff93-4560-bdf1-f43c385a27c2.png)

### 3. Create your first template

[**Templates**](https://coder.com/docs/v2/latest/templates): Templates are written in Terraform and describe the infrastructure for workspaces. Coder provides a set of starter templates to help you get started.

Choose a template to set up your first workspace. You can also [create your own templates](https://coder.com/docs/v2/latest/templates) to define your custom infrastructure with your preferred cloud provider.
![starter templates](https://raw.githubusercontent.com/coder/blogs/main/posts/coder-on-railway/static/starter_templates_welcome.png)

### 4. Create your first workspace

[**Workspaces**](https://coder.com/docs/v2/latest/workspaces): Workspaces contain the IDEs, dependencies, and configuration information needed for software development. You can create workspaces from templates. Here wea are showing the workspaces created from the Fly.io starter template in action.
![fly.io workspace](https://raw.githubusercontent.com/coder/blogs/main/posts/coder-on-railway/static/fly_workspace.png)

## Optional

### 1. Attach a custom domain

Your Coder deployment will always be accessible at `https://app-name.onrender.com`. If you want to use a custom domain, you can go to Dashboard &gt; Coder (Service) &gt; Settings &gt; Custom Domains and add your domain and optionally a wildcard subdomain of form `*.coder.example.com`.

### 2. Enable port-forwarding for workspace apps

Coder allows you to set an optional environment variable, `CODER_WILDCARD_ACCESS_URL` which lets you forward ports from your workspace to a custom wildcard subdomain of the URL you provide. This is useful if you want to access a service running in your workspace from a browser. For example, if you set `CODER_WILDCARD_ACCESS_URL` to `*.coder.example.com`, you can access a service running on port 8080 in your workspace by visiting `8080--app-name-workspace-name-.coder.example.com` in your browser.


> Note: This is an optional step. If you do not set this variable, you cannot access services running in your workspace from a browser. You must use a custom domain with Render and cannot use Render's built-in domain for this wildcard.

> Note: You can set environment variables by going to _Dashboard &gt; Coder (Service) &gt; Settings &gt; Environment &gt; Environment Variables_. See our [docs](https://coder.com/docs/v2/latest/cli/server) for more information on environment variables that can be set.

## Upgrade

Coder is getting new features and improvmnets constantly and its it is suggested to stay on latest version. To upgrade,

Go to _Dashboard &gt; Coder (Service)_ and do a **Manual Deploy**. or alternativly turn on auto deployments in _Dashboard &gt; Coder (Service) &gt; Settings &gt; Build & Deploy &gt; Auto Deploy_.

## Docs and resources

- [**Coder on GitHub**](https://github.com/coder/coder)
- [**Coder docs**](https://coder.com/docs/v2)
- [**VS Code Extension**](https://marketplace.visualstudio.com/items?itemName=coder.coder-remote): Open any Coder workspace in VS Code with a single click
- [**JetBrains Gateway Extension**](https://plugins.jetbrains.com/plugin/19620-coder): Open any Coder workspace in JetBrains Gateway with a single click

- [**Coder GitHub Action**](https://github.com/marketplace/actions/update-coder-template): A GitHub Action that updates Coder templates
- [**Various Templates**](https://github.com/coder/coder/examples/templates/community-templates.md): Hetzner Cloud, Docker in Docker, and other templates the community has built.
- [![Coder discord](https://img.shields.io/discord/747933592273027093?label=discord)](https://discord.gg/coder)