{"id":16328744,"url":"https://github.com/sourcegraph/deploy-sourcegraph-digitalocean","last_synced_at":"2025-10-25T21:30:35.744Z","repository":{"id":38215721,"uuid":"172761074","full_name":"sourcegraph/deploy-sourcegraph-digitalocean","owner":"sourcegraph","description":"Deploy Sourcegraph on DigitalOcean using Terraform","archived":true,"fork":false,"pushed_at":"2024-04-30T19:21:15.000Z","size":154,"stargazers_count":8,"open_issues_count":4,"forks_count":3,"subscribers_count":58,"default_branch":"master","last_synced_at":"2025-02-10T04:08:20.939Z","etag":null,"topics":["repo-type-infrastructure"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sourcegraph.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2019-02-26T17:50:15.000Z","updated_at":"2024-04-30T19:21:44.000Z","dependencies_parsed_at":"2023-10-04T03:31:29.514Z","dependency_job_id":"e2793a83-caf1-43e3-bb40-cdcc5a5b8e56","html_url":"https://github.com/sourcegraph/deploy-sourcegraph-digitalocean","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdeploy-sourcegraph-digitalocean","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdeploy-sourcegraph-digitalocean/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdeploy-sourcegraph-digitalocean/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sourcegraph%2Fdeploy-sourcegraph-digitalocean/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sourcegraph","download_url":"https://codeload.github.com/sourcegraph/deploy-sourcegraph-digitalocean/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238212347,"owners_count":19434946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["repo-type-infrastructure"],"created_at":"2024-10-10T23:14:29.950Z","updated_at":"2025-10-25T21:30:35.477Z","avatar_url":"https://github.com/sourcegraph.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# 🚨 Deprecation Notice 🚨\n\nThis repository is no longer a supported Sourcegraph deployment method.\nIf you'd like to deploy Sourcegraph, please see our [Deployment Documentation](https://sourcegraph.com/docs/admin/deploy) to learn about our supported deployment methods.\n\n---\n\n# Deploying Sourcegraph on DigitalOcean\n\nThis Terraform plan creates an SSH key and Droplet and deploys the latest stable version of Sourcegraph with TLS using a self-signed certificate.\n\n![DigitalOcean Terraform](https://user-images.githubusercontent.com/133014/56981924-e79fed00-6b34-11e9-9590-6d297d89bcd2.gif)\n\n🎬 [Watch screencast on Vimeo.com](https://vimeo.com/333392180)\n\n## Prerequisites\n\n- Make\n- [Terraform](https://learn.hashicorp.com/terraform/getting-started/install.html)\n- [mkcert](https://github.com/FiloSottile/mkcert) (optional but required for self-signed cert validation)\n\n\u003e NOTE: A basic level of knowledge and experience using [Terraform](https://www.terraform.io/intro/index.html) is required.\n\n## Terraform DigitalOcean authentication\n\nAuthentication requires a a [DigitalOcean API token](https://www.digitalocean.com/docs/api/create-personal-access-token/) set to the `DIGITALOCEAN_TOKEN` environment variable.\n\n## Terraform plan configuration\n\nThe existence of a `terraform.tfvars` file is required. To create it, copy the contents of `terraform.tfvars.sample` to a new `terraform.tfvars` file and review to see which variables (if any) you'd like to set.\n\n\u003e The only required variable is `ssh_key_file`.\n\n## Commands\n\nThe `Makefile` has commands to cover the most common use-cases. The easiest way to create your Droplet is to run:\n\n```bash\nmake deploy\n```\n\nThis will create the Droplet and poll the server to let you know when Sourcegraph is ready.\n\nOther commands include:\n\n- `make init`: Downloads the required Terraform provider packages.\n- `make plan`: Review what resources Terraform will create, change or remove.\n- `make apply`: Creates the Droplet and SSH key.\n- `make sourcegraph`: Waits for Sourcegraph to accept connections.\n- `make output`: Displays the same output as when `make apply` completes.\n- `make destroy`: Removes the Droplet and SSH key.\n\n\u003e WARNING: `make destroy` will destroy the Droplet so back-up the `/etc/sourcegraph` and `/var/opt/sourcegraph` directories first.\n\n## Upgrading Sourcegraph\n\n1. SSH into the Droplet\n1. Run `./sourcegraph-upgrade`\n\nThe newer Docker image will be pulled and Sourcegraph will be restarted.\n\n## Troubleshooting\n\n```bash\n./bin/wait-for-it.sh: line 58: timeout: command not found\n```\n\nThe `bin/wait-for-it.sh` script uses the `timeout` binary which is not included in macOS. Install using homebrew:\n\n```bash\n  brew install coreutils\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fdeploy-sourcegraph-digitalocean","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsourcegraph%2Fdeploy-sourcegraph-digitalocean","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsourcegraph%2Fdeploy-sourcegraph-digitalocean/lists"}