Skip to content
Draft
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
66 changes: 41 additions & 25 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,46 +120,62 @@ services:
--dangerous-allow-cors-requests=true
--enable-terraform-debug-mode

setup:
# setup:
# labels:
# - "com.coder.dev"
# networks:
# - coder-dev
# image: codercom/oss-dogfood:latest
# depends_on:
# coderd:
# condition: service_healthy
# working_dir: /app
# environment:
# CODER_URL: "http://coderd:3000"
# DOCKER_HOST: "${DOCKER_HOST:-unix:///var/run/docker.sock}"
# GOMODCACHE: /go-cache/mod
# GOCACHE: /go-cache/build
# volumes:
# - .:/app
# - go_cache:/go-cache
# - coderv2_config:/home/coder/.config/coderv2
# - ./scripts/docker-dev:/scripts:ro
# command: ["sh", "/scripts/setup.sh"]
# restart: no
site:
labels:
- "com.coder.dev"
networks:
- coder-dev
image: codercom/oss-dogfood:latest
depends_on:
coderd:
condition: service_healthy
working_dir: /app
working_dir: /app/site
environment:
CODER_URL: "http://coderd:3000"
DOCKER_HOST: "${DOCKER_HOST:-unix:///var/run/docker.sock}"
GOMODCACHE: /go-cache/mod
GOCACHE: /go-cache/build
CODER_HOST: "http://coderd:3000"
ports:
- "8080:8080"
volumes:
- .:/app
- go_cache:/go-cache
- coderv2_config:/home/coder/.config/coderv2
- ./scripts/docker-dev:/scripts:ro
command: ["sh", "/scripts/setup.sh"]
- ./site:/app/site
command: sh -c "pnpm install --frozen-lockfile && pnpm dev --host"

site:
cdevsetup:
labels:
- "com.coder.dev"
networks:
- coder-dev
image: codercom/oss-dogfood:latest
build:
context: ./scripts/cdev/cdevsetup
dockerfile: Dockerfile
depends_on:
setup:
condition: service_completed_successfully
working_dir: /app/site
coderd:
condition: service_healthy
working_dir: /app
environment:
CODER_HOST: "http://coderd:3000"
ports:
- "8080:8080"
CODER_URL: "http://coderd:3000"
GOMODCACHE: /go-cache/mod
GOCACHE: /go-cache/build
volumes:
- ./site:/app/site
- site_node_modules:/app/site/node_modules
command: sh -c "pnpm install --frozen-lockfile && pnpm dev --host"
- go_cache:/go-cache
- ./examples/templates:/app/examples/templates:ro

volumes:
coder_dev_data:
Expand Down
15 changes: 15 additions & 0 deletions scripts/cdev/cdevsetup/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM golang:1.25.6-alpine

WORKDIR /app

# Copy go.mod and go.sum for dependency caching
COPY go.mod go.sum ./
RUN go mod download

# Copy the source code
COPY main.go ./

# Build the binary
RUN go build -o /cdevsetup main.go

ENTRYPOINT ["/cdevsetup", "remain"]
162 changes: 162 additions & 0 deletions scripts/cdev/cdevsetup/go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,162 @@
module github.com/coder/coder/v2/scripts/cdev/cdevsetup

go 1.25.6

require (
github.com/coder/coder/v2 v2.30.1
github.com/google/uuid v1.6.0
golang.org/x/xerrors v0.0.0-20240903120638-7835f813f4da
)

require (
cdr.dev/slog/v3 v3.0.0-rc1 // indirect
github.com/DataDog/appsec-internal-go v1.11.2 // indirect
github.com/DataDog/datadog-agent/comp/core/tagger/origindetection v0.64.2 // indirect
github.com/DataDog/datadog-agent/pkg/obfuscate v0.64.2 // indirect
github.com/DataDog/datadog-agent/pkg/proto v0.64.2 // indirect
github.com/DataDog/datadog-agent/pkg/remoteconfig/state v0.64.2 // indirect
github.com/DataDog/datadog-agent/pkg/trace v0.64.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/log v0.64.2 // indirect
github.com/DataDog/datadog-agent/pkg/util/scrubber v0.64.2 // indirect
github.com/DataDog/datadog-agent/pkg/version v0.64.2 // indirect
github.com/DataDog/datadog-go/v5 v5.6.0 // indirect
github.com/DataDog/dd-trace-go/v2 v2.0.0 // indirect
github.com/DataDog/go-libddwaf/v3 v3.5.4 // indirect
github.com/DataDog/go-runtime-metrics-internal v0.0.4-0.20250319104955-81009b9bad14 // indirect
github.com/DataDog/go-sqllexer v0.1.3 // indirect
github.com/DataDog/go-tuf v1.1.0-0.5.2 // indirect
github.com/DataDog/gostackparse v0.7.0 // indirect
github.com/DataDog/opentelemetry-mapping-go/pkg/otlp/attributes v0.26.0 // indirect
github.com/DataDog/sketches-go v1.4.7 // indirect
github.com/Masterminds/semver/v3 v3.3.1 // indirect
github.com/Microsoft/go-winio v0.6.2 // indirect
github.com/acarl005/stripansi v0.0.0-20180116102854-5a71ef0e047d // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect
github.com/aymerick/douceur v0.2.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/brianvoe/gofakeit/v7 v7.14.0 // indirect
github.com/cenkalti/backoff/v5 v5.0.3 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/cihub/seelog v0.0.0-20170130134532-f561c5e57575 // indirect
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 // indirect
github.com/coder/serpent v0.13.0 // indirect
github.com/coder/terraform-provider-coder/v2 v2.13.1 // indirect
github.com/coder/websocket v1.8.14 // indirect
github.com/coreos/go-oidc/v3 v3.17.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/eapache/queue/v2 v2.0.0-20230407133247-75960ed334e4 // indirect
github.com/ebitengine/purego v0.8.4 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/go-chi/chi/v5 v5.2.2 // indirect
github.com/go-jose/go-jose/v4 v4.1.3 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-ole/go-ole v1.3.0 // indirect
github.com/go-viper/mapstructure/v2 v2.4.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/pprof v0.0.0-20250607225305-033d6d78b36a // indirect
github.com/gorilla/css v1.0.1 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cty v1.5.0 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hcl/v2 v2.24.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.29.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-plugin-sdk/v2 v2.38.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/lucasb-eyer/go-colorful v1.3.0 // indirect
github.com/lufia/plan9stats v0.0.0-20250317134145-8bc96cf8fc35 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/microcosm-cc/bluemonday v1.0.27 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.1-0.20231216201459-8508981c8b6c // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/muesli/termenv v0.16.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/outcaste-io/ristretto v0.2.3 // indirect
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
github.com/pion/transport/v2 v2.2.10 // indirect
github.com/pion/udp v0.1.4 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/planetscale/vtprotobuf v0.6.1-0.20240319094008-0393e58bdf10 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/power-devops/perfstat v0.0.0-20240221224432-82ca36839d55 // indirect
github.com/prometheus/client_golang v1.23.2 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.67.4 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/puzpuzpuz/xsync/v3 v3.5.1 // indirect
github.com/richardartoul/molecule v1.0.1-0.20240531184615-7ca0df43c0b3 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/robfig/cron/v3 v3.0.1 // indirect
github.com/secure-systems-lab/go-securesystemslib v0.9.0 // indirect
github.com/shirou/gopsutil/v4 v4.25.5 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.10 // indirect
github.com/stretchr/testify v1.11.1 // indirect
github.com/tinylib/msgp v1.2.5 // indirect
github.com/tklauser/go-sysconf v0.3.15 // indirect
github.com/tklauser/numcpus v0.10.0 // indirect
github.com/valyala/fasthttp v1.69.0 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/vmihailenco/msgpack/v5 v5.4.1 // indirect
github.com/vmihailenco/tagparser/v2 v2.0.0 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
github.com/yusufpapurcu/wmi v1.2.4 // indirect
github.com/zclconf/go-cty v1.17.0 // indirect
github.com/zeebo/errs v1.4.0 // indirect
go.nhat.io/otelsql v0.16.0 // indirect
go.opentelemetry.io/auto/sdk v1.2.1 // indirect
go.opentelemetry.io/collector/component v1.27.0 // indirect
go.opentelemetry.io/collector/pdata v1.27.0 // indirect
go.opentelemetry.io/collector/pdata/pprofile v0.121.0 // indirect
go.opentelemetry.io/collector/semconv v0.123.0 // indirect
go.opentelemetry.io/otel v1.39.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.37.0 // indirect
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.39.0 // indirect
go.opentelemetry.io/otel/sdk v1.39.0 // indirect
go.opentelemetry.io/otel/trace v1.39.0 // indirect
go.opentelemetry.io/proto/otlp v1.7.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
go.yaml.in/yaml/v2 v2.4.3 // indirect
golang.org/x/crypto v0.47.0 // indirect
golang.org/x/exp v0.0.0-20251023183803-a4bb9ffd2546 // indirect
golang.org/x/mod v0.32.0 // indirect
golang.org/x/net v0.49.0 // indirect
golang.org/x/oauth2 v0.34.0 // indirect
golang.org/x/sync v0.19.0 // indirect
golang.org/x/sys v0.40.0 // indirect
golang.org/x/term v0.39.0 // indirect
golang.org/x/text v0.33.0 // indirect
golang.org/x/time v0.14.0 // indirect
golang.org/x/tools v0.41.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20260120174246-409b4a993575 // indirect
google.golang.org/grpc v1.78.0 // indirect
google.golang.org/protobuf v1.36.11 // indirect
gopkg.in/DataDog/dd-trace-go.v1 v1.74.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
storj.io/drpc v0.0.34 // indirect
tailscale.com v1.80.3 // indirect
)
Loading
Loading