-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.dev.yaml
More file actions
64 lines (60 loc) · 1.92 KB
/
Copy pathcompose.dev.yaml
File metadata and controls
64 lines (60 loc) · 1.92 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
# Database and asset storage, for editor-hosted development. The full stack
# (app, worker, Caddy) lives in compose.yaml. The explicit project name keeps
# this stack's containers and volumes separate from the full stack's.
name: codex-dev
services:
db:
image: postgres:18-alpine
environment:
POSTGRES_USER: codex
POSTGRES_PASSWORD: codex
POSTGRES_DB: codex
ports:
- '${DEV_DB_PORT:-5432}:5432'
volumes:
- db-data:/var/lib/postgresql
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U codex']
interval: 5s
timeout: 5s
retries: 10
# Asset storage for development. Unlike the deployment stack's MinIO, this
# one publishes its ports: the app and the tests run on the host here, not
# inside the compose network. Exports and image uploads stay hidden until
# asset storage is configured, so the end-to-end suite needs this running.
minio:
image: minio/minio
command: server /data --console-address ':9001'
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-codex-minio}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-codex-minio-secret}
ports:
- '${DEV_MINIO_PORT:-9000}:9000'
- '${DEV_MINIO_CONSOLE_PORT:-9001}:9001'
volumes:
- minio-data:/data
healthcheck:
test: ['CMD-SHELL', 'mc ready local || exit 1']
interval: 5s
timeout: 5s
retries: 10
# One-shot: creates the bucket on first start, then exits.
minio-init:
image: minio/mc
depends_on:
minio:
condition: service_healthy
restart: 'no'
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-codex-minio}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-codex-minio-secret}
entrypoint:
- sh
- -c
- >
until mc alias set local http://minio:9000 "$$MINIO_ROOT_USER" "$$MINIO_ROOT_PASSWORD";
do sleep 1; done &&
mc mb -p local/codex-assets
volumes:
db-data:
minio-data: