-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProcfile.example.toml
More file actions
96 lines (88 loc) · 4.52 KB
/
Copy pathProcfile.example.toml
File metadata and controls
96 lines (88 loc) · 4.52 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
# Example Procfile.toml for proccie
#
# Global keys (outside any process section):
# env_file - (optional) path to a dotenv-style file whose variables
# are applied to all processes
# environment - (optional) inline table of environment variables applied
# to all processes. Overrides global env_file but is
# overridden by per-process env_file and environment.
#
# Per-process keys:
# command - (required) shell command to run
# exit_codes - (optional) array of integers of expected exit codes.
# If the process exits with one of these codes, it won't trigger
# a shutdown. Omit for long-running services that should never exit.
# readiness - (optional) readiness check; dependents wait until it completes.
# Mutually exclusive with exit_codes. Four mutually-exclusive
# modes, one per readiness table. interval/timeout are shared and
# live at the readiness top level:
# readiness.interval = 2 # seconds or "500ms"; default 1
# readiness.timeout = 60 # default 30
# * shell -- poll a command; ready on an allowed exit code
# (exit_codes) and/or matching stdout (output); at least one:
# readiness.shell.cmd = "curl -s http://localhost:3000/health"
# readiness.shell.output = "\"status\":\"ok\""
# readiness.shell.exit_codes = [0]
# * http -- poll a URL; ready on an allowed status and/or body:
# readiness.http.url = "http://localhost:3000/health"
# readiness.http.status = [200, 204] # int or list; default 200
# readiness.http.output = "\"status\":\"ok\""
# * output -- watch the process's OWN stdout for a substring:
# readiness.output = "Listening on"
# * delay -- sleep a fixed duration after launch, then mark ready:
# readiness.delay = "3s"
# depends_on - (optional) list of process names that must be ready first
# env_file - (optional) path to a dotenv-style file for this process only
# environment - (optional) inline table of extra environment variables
# log_file - (optional) file path to write a copy of this process's
# output to (plain text, no colors), in addition to the console
# max_retries - (optional) integer, max number of times to restart on
# failure before proccie shuts down. Default 0 (no retries).
# Incompatible with readiness.
# name - (optional) display label for the log prefix and TUI tab.
# Defaults to the section name (which stays the identifier used
# in depends_on/--only/--except). Must be unique.
# color - (optional) override the auto-assigned prefix/tab color: one of
# the 16 named ANSI colors (black/red/green/yellow/blue/magenta/
# cyan/white and their "bright-" variants, case-insensitive) or a
# "#rrggbb" hex value.
# Global env file -- loaded for all processes
env_file = ".env"
# Global inline env vars -- applied to all processes, overrides env_file
environment = { COMPOSE_PROJECT = "myapp", LOG_LEVEL = "info" }
[db]
command = "postgres -D /usr/local/var/postgres"
readiness.shell.cmd = "pg_isready -q"
readiness.shell.exit_codes = [0]
color = "bright-blue"
[migrations]
command = "rake db:migrate"
exit_codes = [0]
depends_on = ["db"]
# Ready only once the health endpoint returns 200 *and* reports status "ok".
[backend]
command = "bin/rails server -p 3000"
depends_on = ["migrations"]
readiness.http.url = "http://localhost:3000/health"
readiness.http.status = 200
readiness.http.output = "\"status\":\"ok\""
readiness.timeout = 60
readiness.interval = 2
environment = { RAILS_ENV = "development", PORT = "3000" }
log_file = "tmp/backend.log"
name = "rails"
color = "#ff8800"
[frontend]
command = "npm run dev"
depends_on = ["backend"]
env_file = ".env.frontend"
environment = { PORT = "5173", NODE_ENV = "development" }
readiness.output = "ready in"
# No easy health probe: give it a fixed warm-up before dependents start.
[mailhog]
command = "mailhog"
readiness.delay = "2s"
[worker]
command = "bundle exec sidekiq"
depends_on = ["db", "mailhog"]
max_retries = 3