-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
97 lines (92 loc) · 3.54 KB
/
docker-compose.yaml
File metadata and controls
97 lines (92 loc) · 3.54 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
# =============================================================================
# PromptScript Docker Compose Configuration
# =============================================================================
# Example configurations for running PromptScript CLI in Docker.
#
# Usage:
# docker compose run --rm prs validate
# docker compose run --rm prs compile
# docker compose up watch
#
# For more information, see: https://getpromptscript.dev/guides/docker/
# =============================================================================
services:
# ---------------------------------------------------------------------------
# Main CLI service - run any prs command
# ---------------------------------------------------------------------------
# Usage: docker compose run --rm prs <command>
# Examples:
# docker compose run --rm prs validate
# docker compose run --rm prs compile
# docker compose run --rm prs init --name myproject
prs:
image: ghcr.io/mrwogu/promptscript:latest
volumes:
- .:/workspace:rw
environment:
- NO_COLOR=${NO_COLOR:-}
- PROMPTSCRIPT_VERBOSE=${PROMPTSCRIPT_VERBOSE:-}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
# ---------------------------------------------------------------------------
# Watch mode - automatically recompile on file changes
# ---------------------------------------------------------------------------
# Usage: docker compose up watch
# Runs in foreground with TTY for colored output
watch:
image: ghcr.io/mrwogu/promptscript:latest
volumes:
- .:/workspace:rw
command: ['compile', '--watch']
tty: true
environment:
- PROMPTSCRIPT_VERBOSE=${PROMPTSCRIPT_VERBOSE:-}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
# ---------------------------------------------------------------------------
# Validation service - read-only for CI/CD
# ---------------------------------------------------------------------------
# Usage: docker compose run --rm validate
# Mounts workspace as read-only for security in CI environments
validate:
image: ghcr.io/mrwogu/promptscript:latest
volumes:
- .:/workspace:ro
command: ['validate', '--strict']
environment:
- NO_COLOR=${NO_COLOR:-1}
# ---------------------------------------------------------------------------
# Development service - with shell access
# ---------------------------------------------------------------------------
# Usage: docker compose run --rm dev sh
# Useful for debugging or exploring the container
dev:
image: ghcr.io/mrwogu/promptscript:latest
volumes:
- .:/workspace:rw
entrypoint: []
command: ['sh']
stdin_open: true
tty: true
environment:
- NO_COLOR=${NO_COLOR:-}
- PROMPTSCRIPT_VERBOSE=${PROMPTSCRIPT_VERBOSE:-}
- GITHUB_TOKEN=${GITHUB_TOKEN:-}
# ---------------------------------------------------------------------------
# Playground server - connect online playground to local files
# ---------------------------------------------------------------------------
# Usage: docker compose up playground
# Then open: https://getpromptscript.dev/playground/?server=localhost:3000
playground:
image: ghcr.io/mrwogu/promptscript:latest
command: ['serve', '--host', '0.0.0.0']
ports:
- '3000:3000'
volumes:
- .:/workspace:rw
working_dir: /workspace
environment:
- PROMPTSCRIPT_VERBOSE=${PROMPTSCRIPT_VERBOSE:-}
healthcheck:
test: ['CMD', 'wget', '--spider', '-q', 'http://localhost:3000/api/health']
interval: 10s
timeout: 3s
retries: 3