Skip to content
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
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
72 changes: 39 additions & 33 deletions deployment/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ services:
- "7091:7091"
depends_on:
- mysql
- metald-aio
# - metald-aio
- otel
Comment thread
chronark marked this conversation as resolved.
- s3
environment:
Expand Down Expand Up @@ -286,38 +286,44 @@ services:
# Bootstrap workspace/API IDs
# Reading from env file, no override necessary
# Unkey Deploy Services - All-in-one development container with all 4 services
metald-aio:
build:
context: ../go
dockerfile: deploy/Dockerfile.dev
platform: linux/amd64
container_name: metald-aio
hostname: metald-aio
privileged: true # Required for systemd
volumes:
# Mount Docker socket for metald Docker backend
- /var/run/docker.sock:/var/run/docker.sock
# Persistent storage for development
- metald-aio-data:/opt
# Systemd requires these mounts
- /sys/fs/cgroup:/sys/fs/cgroup:ro
ports:
# Only expose metald port (agent already uses 8080)
- "8090:8080" # metald
depends_on:
- otel
environment:
# Development environment
- UNKEY_ENVIRONMENT=development
- UNKEY_LOG_LEVEL=debug
# Docker backend configuration
- UNKEY_METALD_BACKEND=docker
- UNKEY_METALD_DOCKER_HOST=unix:///var/run/docker.sock
# Service discovery (internal container ports)
- UNKEY_METALD_BILLING_ENDPOINT=http://localhost:8081
- UNKEY_METALD_ASSETMANAGER_ENDPOINT=http://localhost:8083
- UNKEY_ASSETMANAGERD_BUILDERD_ENDPOINT=http://localhost:8082
- UNKEY_BUILDERD_ASSETMANAGER_ENDPOINT=http://localhost:8083
#
#############################################################################
# This doesn't run right now while we change the protos and get metald into a
# happy state again.
#############################################################################
#
# metald-aio:
# build:
# context: ../go
# dockerfile: deploy/Dockerfile.dev
# platform: linux/amd64
# container_name: metald-aio
# hostname: metald-aio
# privileged: true # Required for systemd
# volumes:
# # Mount Docker socket for metald Docker backend
# - /var/run/docker.sock:/var/run/docker.sock
# # Persistent storage for development
# - metald-aio-data:/opt
# # Systemd requires these mounts
# - /sys/fs/cgroup:/sys/fs/cgroup:ro
# ports:
# # Only expose metald port (agent already uses 8080)
# - "8090:8080" # metald
# depends_on:
# - otel
# environment:
# # Development environment
# - UNKEY_ENVIRONMENT=development
# - UNKEY_LOG_LEVEL=debug
# # Docker backend configuration
# - UNKEY_METALD_BACKEND=docker
# - UNKEY_METALD_DOCKER_HOST=unix:///var/run/docker.sock
# # Service discovery (internal container ports)
# - UNKEY_METALD_BILLING_ENDPOINT=http://localhost:8081
# - UNKEY_METALD_ASSETMANAGER_ENDPOINT=http://localhost:8083
# - UNKEY_ASSETMANAGERD_BUILDERD_ENDPOINT=http://localhost:8082
# - UNKEY_BUILDERD_ASSETMANAGER_ENDPOINT=http://localhost:8083
volumes:
mysql:
clickhouse:
Expand Down
2 changes: 1 addition & 1 deletion go/apps/api/openapi/openapi-generated.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5687,7 +5687,7 @@ paths:

Use this for rate limiting beyond API keys - limit users by ID, IPs by address, or any custom identifier. Supports namespace organization, variable costs, and custom overrides.

**Response Codes**: Successful ratelimit checks return HTTP 200. 4xx responses indicate auth, namespace existence/deletion, or validation errors (e.g., 410 Gone for deleted namespaces). 5xx responses indicate server errors.
**Response Codes**: Rate limit checks return HTTP 200 regardless of whether the limit is exceeded - check the `success` field in the response to determine if the request should be allowed. 4xx responses indicate auth, namespace existence/deletion, or validation errors (e.g., 410 Gone for deleted namespaces). 5xx responses indicate server errors.

**Required Permissions**

Expand Down
4 changes: 2 additions & 2 deletions go/apps/ctrl/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"github.com/unkeyed/unkey/go/apps/ctrl/services/openapi"
deployTLS "github.com/unkeyed/unkey/go/deploy/pkg/tls"
"github.com/unkeyed/unkey/go/gen/proto/ctrl/v1/ctrlv1connect"
"github.com/unkeyed/unkey/go/gen/proto/metal/vmprovisioner/v1/vmprovisionerv1connect"
"github.com/unkeyed/unkey/go/gen/proto/metald/v1/metaldv1connect"
"github.com/unkeyed/unkey/go/pkg/db"
"github.com/unkeyed/unkey/go/pkg/hydra"
"github.com/unkeyed/unkey/go/pkg/otel"
Expand Down Expand Up @@ -171,7 +171,7 @@ func Run(ctx context.Context, cfg Config) error {

httpClient.Timeout = 30 * time.Second

metaldClient := vmprovisionerv1connect.NewVmServiceClient(
metaldClient := metaldv1connect.NewVmServiceClient(
httpClient,
cfg.MetaldAddress,
connect.WithInterceptors(connect.UnaryInterceptorFunc(func(next connect.UnaryFunc) connect.UnaryFunc {
Expand Down
Loading
Loading