-
-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
94 lines (90 loc) · 3.84 KB
/
Copy pathdocker-compose.yml
File metadata and controls
94 lines (90 loc) · 3.84 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
# Self-hosted Convex backend for FreeSocks Control Plane.
#
# Vendored from the official get-convex/convex-backend self-hosted template.
# Defaults to single-box SQLite under the `data` volume; set POSTGRES_URL (in
# .env.docker) to move to Postgres later. See docs/convex-self-hosting.md.
#
# Run via the package.json scripts (bun run selfhost:up / :down / :env), which
# pass --env-file .env.docker. The docker env lives in .env.docker, NOT .env,
# which Vite and the Convex CLI would also load.
#
# This is the DEV stack. PRODUCTION uses docker-compose.stack.yml, which is fully
# digest-pinned — do NOT promote this file to prod. (The `:latest` tags below are
# fine for throwaway local dev; pin them to a `:<rev>`/digest first if you ever
# must ship this file.)
# Compose project name -> container/volume prefix: fcp-backend-1, fcp-dashboard-1, fcp_data.
name: fcp
services:
backend:
image: ghcr.io/get-convex/convex-backend:latest
# Survive a Docker Desktop / daemon restart (the backend is separate from
# `bun run dev`, so it must stay up on its own). `down` still removes it.
restart: unless-stopped
stop_grace_period: 10s
stop_signal: SIGINT
# Loopback-only (like the beta compose): :3210 is the raw Convex
# query/mutation channel — anything exported as a public function is
# callable on it, so it must NEVER be bound to a public interface.
ports:
- '127.0.0.1:${PORT:-3210}:3210'
- '127.0.0.1:${SITE_PROXY_PORT:-3211}:3211'
volumes:
- data:/convex/data
environment:
# Raised above the 10s self-hosted default so the lifecycle sweeps and
# backend-issuance actions don't time out (migration plan risk R2).
- ACTIONS_USER_TIMEOUT_SECS=${ACTIONS_USER_TIMEOUT_SECS:-120}
- APPLICATION_MAX_CONCURRENT_MUTATIONS=${APPLICATION_MAX_CONCURRENT_MUTATIONS:-16}
- APPLICATION_MAX_CONCURRENT_NODE_ACTIONS=${APPLICATION_MAX_CONCURRENT_NODE_ACTIONS:-16}
- APPLICATION_MAX_CONCURRENT_QUERIES=${APPLICATION_MAX_CONCURRENT_QUERIES:-16}
- APPLICATION_MAX_CONCURRENT_V8_ACTIONS=${APPLICATION_MAX_CONCURRENT_V8_ACTIONS:-16}
- AWS_ACCESS_KEY_ID
- AWS_REGION
- AWS_S3_DISABLE_CHECKSUMS
- AWS_S3_DISABLE_SSE
- AWS_S3_FORCE_PATH_STYLE
- AWS_SECRET_ACCESS_KEY
- AWS_SESSION_TOKEN
- CONVEX_CLOUD_ORIGIN=${CONVEX_CLOUD_ORIGIN:-http://127.0.0.1:${PORT:-3210}}
- CONVEX_RELEASE_VERSION_DEV
- CONVEX_SITE_ORIGIN=${CONVEX_SITE_ORIGIN:-http://127.0.0.1:${SITE_PROXY_PORT:-3211}}
- DATABASE_URL
- DISABLE_BEACON
- DISABLE_METRICS_ENDPOINT=${DISABLE_METRICS_ENDPOINT:-true}
- DOCUMENT_RETENTION_DELAY=${DOCUMENT_RETENTION_DELAY:-172800}
- DO_NOT_REQUIRE_SSL=${DO_NOT_REQUIRE_SSL:-true}
- HTTP_SERVER_TIMEOUT_SECONDS
- INSTANCE_NAME
- INSTANCE_SECRET
- MYSQL_URL
- POSTGRES_URL
- REDACT_LOGS_TO_CLIENT
- RUST_BACKTRACE
# Privacy: silence the per-request HTTP access line (logs the peer socket +
# request line) like the beta stack, while keeping warn/error. See docs/privacy.md.
- RUST_LOG=${RUST_LOG:-info,convex-cloud-http=warn}
- S3_ENDPOINT_URL
- S3_STORAGE_EXPORTS_BUCKET
- S3_STORAGE_FILES_BUCKET
- S3_STORAGE_MODULES_BUCKET
- S3_STORAGE_SEARCH_BUCKET
- S3_STORAGE_SNAPSHOT_IMPORTS_BUCKET
healthcheck:
test: curl -f http://localhost:3210/version
interval: 5s
start_period: 10s
dashboard:
image: ghcr.io/get-convex/convex-dashboard:latest
restart: unless-stopped
stop_grace_period: 10s
stop_signal: SIGINT
ports:
- '127.0.0.1:${DASHBOARD_PORT:-6791}:6791'
environment:
- NEXT_PUBLIC_DEPLOYMENT_URL=${NEXT_PUBLIC_DEPLOYMENT_URL:-http://127.0.0.1:${PORT:-3210}}
- NEXT_PUBLIC_LOAD_MONACO_INTERNALLY
depends_on:
backend:
condition: service_healthy
volumes:
data: