Skip to content

chore: Deploy internally accessible godoc container #1415

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 3 commits into from
May 13, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
chore: Add Cloud Run configuration for internal godoc hosting
  • Loading branch information
dwahler committed May 12, 2022
commit 54af92792abaa06ce2ff2881d892a94d4dd7f91f
3 changes: 3 additions & 0 deletions scripts/internal-docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Configuration for automatically building and hosting an internal godoc site.
This will become obsolete once we make the repo public and can use
https://pkg.go.dev/.
8 changes: 8 additions & 0 deletions scripts/internal-docs/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
steps:
- name: gcr.io/cloud-builders/docker
args: ['build', '-t', 'gcr.io/coder-devrel/internal-docs', '-f', 'scripts/internal-docs/docker/Dockerfile', '.']
- name: gcr.io/cloud-builders/docker
args: ['push', 'gcr.io/coder-devrel/internal-docs']
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
entrypoint: gcloud
args: ['run', 'deploy', 'internal-docs', '--image', 'gcr.io/coder-devrel/internal-docs', '--region', 'us-central1']
9 changes: 9 additions & 0 deletions scripts/internal-docs/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM golang:1.18-alpine

RUN go install golang.org/x/tools/cmd/godoc@v0.1.10

WORKDIR /go/src/github.com/coder/coder
ADD . .

EXPOSE 6060
CMD godoc -http :6060