From ba4374c5d79c7327cd86b2181cb2ce8db0e4c023 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 10:29:13 +0300 Subject: [PATCH 1/8] Force Heroku build. From 1a7d672480ca5e870115b73d87a90d9daa716027 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 10:57:07 +0300 Subject: [PATCH 2/8] Add Upgrade instructions --- heroku/README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 heroku/README.md diff --git a/heroku/README.md b/heroku/README.md new file mode 100644 index 0000000..8b061d1 --- /dev/null +++ b/heroku/README.md @@ -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 + ``` + + Replace `` 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 + ``` + + Replace `` 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 `` 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. From 9577dc5a540ff83bf4c73069f8abd293381e6f43 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 10:58:34 +0300 Subject: [PATCH 3/8] add docs on heroku --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 591f67a..947b6a7 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,6 @@ Install [Coder](https://github.com/coder/coder) to your preferred cloud with a p | AWS EC2 Logo | 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) | | Fly.io Logo | 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) | | Railway.app Logo | 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) | -| Heroku Logo | Heroku | Live ✅ | | [![Deploy Coder on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coder/packages) | +| Heroku Logo | 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) | | AWS EKS Logo | AWS EKS | In progress | [Docs: Coder on Kubernetes](https://coder.com/docs/v2/latest/install/kubernetes) | [Deploy from AWS Marketplace](https://example.com) | | Google Compute Engine logo | Google Compute Engine | Considering | [Guide: Google Compute Engine](https://coder.com/docs/v2/latest/platforms/google-cloud-platform) | | From a1ef4c72fc3fe5eaa591e8a8fa4f4121b4857bd8 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 11:49:37 +0300 Subject: [PATCH 4/8] Add render deployment (#8) --- .github/dependabot.yml | 5 ++++ README.md | 11 ++++---- assets/render.png | Bin 0 -> 1320 bytes render.yaml | 22 +++++++++++++++ render/Dockerfile | 6 ++++ render/README.md | 62 +++++++++++++++++++++++++++++++++++++++++ 6 files changed, 101 insertions(+), 5 deletions(-) create mode 100644 assets/render.png create mode 100644 render.yaml create mode 100644 render/Dockerfile create mode 100644 render/README.md diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c57a68b..6b70973 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -9,3 +9,8 @@ updates: directory: "heroku" schedule: interval: "daily" + + - package-ecosystem: "docker" + directory: "render" + schedule: + interval: "daily" diff --git a/README.md b/README.md index 591f67a..a4ef87b 100644 --- a/README.md +++ b/README.md @@ -2,11 +2,12 @@ Install [Coder](https://github.com/coder/coder) to your preferred cloud with a pre-built package. -| Logo | Platform Name | Status | Documentation | Deploy | -| ---------------------------------------------------------------------------------------- | --------------------- | ----------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| AWS EC2 Logo | 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) | -| Fly.io Logo | 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) | -| Railway.app Logo | 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) | +| Logo | Platform Name | Status | Documentation | Deploy | +| ---------------------------------------------------------------------------------------- | --------------------- | ----------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| AWS EC2 Logo | 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) | +| Fly.io Logo | 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) | +| Railway.app Logo | Railway.app | Live ✅ | | [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/cUQ8_P?referralCode=tfH8Uw) | | Heroku Logo | Heroku | Live ✅ | | [![Deploy Coder on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coder/packages) | +| Render.com Logo | Render.com | Live ✅ | | [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/coder/packages) | | AWS EKS Logo | AWS EKS | In progress | [Docs: Coder on Kubernetes](https://coder.com/docs/v2/latest/install/kubernetes) | [Deploy from AWS Marketplace](https://example.com) | | Google Compute Engine logo | Google Compute Engine | Considering | [Guide: Google Compute Engine](https://coder.com/docs/v2/latest/platforms/google-cloud-platform) | | diff --git a/assets/render.png b/assets/render.png new file mode 100644 index 0000000000000000000000000000000000000000..1e73c424ae105bcf90663bf677e9b9ba6b5f7da2 GIT binary patch literal 1320 zcmV+@1=spgNk&E>1pok7MM6+kP&iB!1pojqYr$F&XXiMQB&o^fasvO&`1m%ReK-Yoe;?Q1u1_xhrQM$;&^Vu zYu{*D`pb4EEh7vm9Sjf)OldIcDBTlx;)=-9QmWnd; z@SLi9MoCMHsqiJ+m477yOq{sG^h&Ez?mssb}nyFIln1vDHhq zYWW7%@#Hc}V-7o?HDY*E*Pno_WW{rrLZ;ZP}A z#d<>=D-|j3SkdyyW7M%*84g0Wr)FUE%+d!Sv?N9ylbA6Kg)FtCcw^}kh7~dDSldiu zC}ycmg#V(S$L?duGnt{drM40J!dJ&eDEKe@L%xXe{&ctHhyIQ literal 0 HcmV?d00001 diff --git a/render.yaml b/render.yaml new file mode 100644 index 0000000..5d4f8d9 --- /dev/null +++ b/render.yaml @@ -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 diff --git a/render/Dockerfile b/render/Dockerfile new file mode 100644 index 0000000..8a1559e --- /dev/null +++ b/render/Dockerfile @@ -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 diff --git a/render/README.md b/render/README.md new file mode 100644 index 0000000..8b0b733 --- /dev/null +++ b/render/README.md @@ -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 > Coder (Service) > Settings > 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 > Coder (Service) > Settings > Environment > 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 > Coder (Service)_ and do a **Manual Deploy**. or alternativly turn on auto deployments in _Dashboard > Coder (Service) > Settings > Build & Deploy > 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) From b72a3ad6d6e3ce9f3331e2164467060ef57fb0a6 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 10:29:13 +0300 Subject: [PATCH 5/8] Force Heroku build. From 2f46340c3fa19e1f133d1dbfc3c190721c0e72d3 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 10:57:07 +0300 Subject: [PATCH 6/8] Add Upgrade instructions --- heroku/README.md | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 heroku/README.md diff --git a/heroku/README.md b/heroku/README.md new file mode 100644 index 0000000..8b061d1 --- /dev/null +++ b/heroku/README.md @@ -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 + ``` + + Replace `` 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 + ``` + + Replace `` 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 `` 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. From 65d7e17e0aa4dfb55091d12e2ac206092df01ec8 Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 10:58:34 +0300 Subject: [PATCH 7/8] add docs on heroku --- README.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index a4ef87b..2c9cb1f 100644 --- a/README.md +++ b/README.md @@ -2,12 +2,12 @@ Install [Coder](https://github.com/coder/coder) to your preferred cloud with a pre-built package. -| Logo | Platform Name | Status | Documentation | Deploy | -| ---------------------------------------------------------------------------------------- | --------------------- | ----------- | ------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | -| AWS EC2 Logo | 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) | -| Fly.io Logo | 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) | -| Railway.app Logo | Railway.app | Live ✅ | | [![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/cUQ8_P?referralCode=tfH8Uw) | -| Heroku Logo | Heroku | Live ✅ | | [![Deploy Coder on Heroku](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy?template=https://github.com/coder/packages) | -| Render.com Logo | Render.com | Live ✅ | | [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/coder/packages) | +| Logo | Platform Name | Status | Documentation | Deploy | +| ---------------------------------------------------------------------------------------- | --------------------- | ----------- | ------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------- | +| AWS EC2 Logo | 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) | +| Fly.io Logo | 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) | +| Railway.app Logo | 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) | +| Heroku Logo | 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) | +| Render.com Logo | Render.com | Live ✅ | | [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/coder/packages) | | AWS EKS Logo | AWS EKS | In progress | [Docs: Coder on Kubernetes](https://coder.com/docs/v2/latest/install/kubernetes) | [Deploy from AWS Marketplace](https://example.com) | | Google Compute Engine logo | Google Compute Engine | Considering | [Guide: Google Compute Engine](https://coder.com/docs/v2/latest/platforms/google-cloud-platform) | | From 8839e54032423f371583822a32cc7d86ed1eeceb Mon Sep 17 00:00:00 2001 From: Muhammad Atif Ali Date: Mon, 24 Apr 2023 11:56:52 +0300 Subject: [PATCH 8/8] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2c9cb1f..6078f43 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,6 @@ Install [Coder](https://github.com/coder/coder) to your preferred cloud with a p | Fly.io Logo | 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) | | Railway.app Logo | 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) | | Heroku Logo | 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) | -| Render.com Logo | Render.com | Live ✅ | | [![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/coder/packages) | +| Render.com Logo | 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) | | AWS EKS Logo | AWS EKS | In progress | [Docs: Coder on Kubernetes](https://coder.com/docs/v2/latest/install/kubernetes) | [Deploy from AWS Marketplace](https://example.com) | | Google Compute Engine logo | Google Compute Engine | Considering | [Guide: Google Compute Engine](https://coder.com/docs/v2/latest/platforms/google-cloud-platform) | |