Skip to content

Commit a70bdfd

Browse files
committed
Add Postgres signed authorization registry
1 parent a70b713 commit a70bdfd

18 files changed

Lines changed: 2381 additions & 325 deletions

.devcontainer/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM mcr.microsoft.com/devcontainers/rust:1-bookworm
2+
3+
RUN apt-get update \
4+
&& apt-get install -y --no-install-recommends postgresql-client \
5+
&& rm -rf /var/lib/apt/lists/*

.devcontainer/devcontainer.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
{
22
"name": "agent-gateway",
3-
"image": "mcr.microsoft.com/devcontainers/rust:1-bookworm",
4-
"runArgs": [
5-
"--userns=keep-id"
3+
"dockerComposeFile": "docker-compose.yml",
4+
"service": "app",
5+
"workspaceFolder": "/workspaces/agent_gateway",
6+
"runServices": [
7+
"app",
8+
"postgres"
69
],
10+
"shutdownAction": "stopCompose",
711
"containerUser": "vscode",
812
"updateRemoteUserUID": false,
913
"containerEnv": {
10-
"HOME": "/home/vscode"
14+
"HOME": "/home/vscode",
15+
"AGENT_GATEWAY_DATABASE_URL": "postgres://agent_gateway_admin:agent_gateway_dev@postgres:5432/agent_gateway",
16+
"TEST_DATABASE_URL": "postgres://agent_gateway_admin:agent_gateway_dev@postgres:5432/agent_gateway"
1117
}
1218
}

.devcontainer/docker-compose.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
services:
2+
app:
3+
build:
4+
context: .
5+
dockerfile: Dockerfile
6+
command: sleep infinity
7+
userns_mode: keep-id
8+
volumes:
9+
- ..:/workspaces/agent_gateway:cached
10+
environment:
11+
HOME: /home/vscode
12+
AGENT_GATEWAY_DATABASE_URL: postgres://agent_gateway_admin:agent_gateway_dev@postgres:5432/agent_gateway
13+
TEST_DATABASE_URL: postgres://agent_gateway_admin:agent_gateway_dev@postgres:5432/agent_gateway
14+
depends_on:
15+
postgres:
16+
condition: service_healthy
17+
18+
postgres:
19+
image: postgres:16
20+
environment:
21+
POSTGRES_DB: agent_gateway
22+
POSTGRES_USER: agent_gateway_admin
23+
POSTGRES_PASSWORD: agent_gateway_dev
24+
ports:
25+
- "5432:5432"
26+
healthcheck:
27+
test: ["CMD-SHELL", "pg_isready -U agent_gateway_admin -d agent_gateway"]
28+
interval: 5s
29+
timeout: 5s
30+
retries: 12
31+
volumes:
32+
- agent-gateway-postgres:/var/lib/postgresql/data
33+
34+
volumes:
35+
agent-gateway-postgres:

0 commit comments

Comments
 (0)