-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
141 lines (135 loc) · 4.64 KB
/
Copy pathdocker-compose.yml
File metadata and controls
141 lines (135 loc) · 4.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
services:
postgres:
image: postgres:18-alpine
container_name: sol-postgres
environment:
POSTGRES_USER: sol
POSTGRES_PASSWORD: sol_dev_password
POSTGRES_DB: sol
ports:
- "5432:5432"
# postgres:18+ expects a single mount at /var/lib/postgresql (data lands in a
# subdirectory) so that pg_upgrade --link works without mount-boundary issues.
volumes:
- sol-pgdata:/var/lib/postgresql
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sol -d sol"]
interval: 5s
timeout: 3s
retries: 10
# Host ports are offset from the defaults: other long-running projects on this
# machine already bind 6379 / 5672 / 15672. Container-internal ports are unchanged.
redis:
image: redis:8-alpine
container_name: sol-redis
command: ["redis-server", "--appendonly", "yes"]
ports:
- "6380:6379"
volumes:
- sol-redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10
rabbitmq:
image: rabbitmq:4-management-alpine
container_name: sol-rabbitmq
environment:
RABBITMQ_DEFAULT_USER: sol
RABBITMQ_DEFAULT_PASS: sol_dev_password
ports:
- "5673:5672"
- "15673:15672"
volumes:
- sol-rabbitdata:/var/lib/rabbitmq
healthcheck:
test: ["CMD", "rabbitmq-diagnostics", "-q", "ping"]
interval: 10s
timeout: 5s
retries: 10
# Official OpenSandbox control plane. It owns Docker access and creates an isolated,
# short-lived container for every approved Skill execution.
opensandbox:
image: opensandbox/server:latest
container_name: sol-opensandbox
ports:
- "8090:8090"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- sol-opensandbox-data:/root/.opensandbox
- ./opensandbox/config.toml:/etc/opensandbox/config.toml:ro
environment:
SANDBOX_CONFIG_PATH: /etc/opensandbox/config.toml
OPENSANDBOX_SERVER_API_KEY: sol-dev-opensandbox-key
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8090/health')"]
interval: 10s
timeout: 5s
retries: 5
restart: unless-stopped
# Native AOT build of Sol.Api (see src/Sol.Api/Dockerfile for the SDK/toolchain notes).
# Containerized so it can reach the OpenSandbox control plane over the Compose network.
api:
image: hejiale010426/sol-api:latest
build:
context: .
dockerfile: src/Sol.Api/Dockerfile
container_name: sol-api
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
rabbitmq:
condition: service_healthy
ports:
- "5298:8080"
environment:
ASPNETCORE_ENVIRONMENT: Development
ASPNETCORE_URLS: http://+:8080
Postgres__ConnectionString: "Host=postgres;Port=5432;Database=sol;Username=sol;Password=sol_dev_password"
Postgres__RunMigrationsOnStartup: "true"
Redis__Configuration: "redis:6379"
Redis__InstanceName: "sol:"
RabbitMq__HostName: rabbitmq
RabbitMq__Port: "5672"
RabbitMq__UserName: sol
RabbitMq__Password: sol_dev_password
Realtime__Backplane: "None"
Authentication__PublicOrigin: "${PUBLIC_ORIGIN:-http://localhost:3000}"
Authentication__GitHub__Enabled: "${GITHUB_OAUTH_ENABLED:-false}"
Authentication__GitHub__ClientId: "${GITHUB_OAUTH_CLIENT_ID:-}"
Authentication__GitHub__ClientSecret: "${GITHUB_OAUTH_CLIENT_SECRET:-}"
Authentication__GitHub__Scope: "read:user user:email"
# Same dev-only placeholders as appsettings.Development.json — never reuse in production.
DeviceIdentity__Pepper: "dev-only-pepper-do-not-use-in-production"
Ai__EncryptionKey: "c29sLWRldi1rZXktbm90LWZvci1wcm9kdWN0aW9uISE="
Skills__SandboxEnabled: "true"
Skills__OpenSandboxDomain: "opensandbox:8090"
Skills__OpenSandboxApiKey: "sol-dev-opensandbox-key"
Skills__OpenSandboxImage: "opensandbox/code-interpreter:v1.1.0"
restart: unless-stopped
web:
image: hejiale010426/sol-web:latest
build:
context: ./web
args:
NEXT_PUBLIC_SITE_URL: ${PUBLIC_ORIGIN:-http://localhost:3000}
API_BASE_URL: http://api:8080
SOL_API_ORIGIN: http://api:8080
container_name: sol-web
depends_on:
- api
ports:
- "3000:3000"
environment:
# Rewrites in next.config.ts and server-side fetches both need the in-network API address.
SOL_API_ORIGIN: http://api:8080
API_BASE_URL: http://api:8080
restart: unless-stopped
volumes:
sol-pgdata:
sol-redisdata:
sol-rabbitdata:
sol-opensandbox-data: