You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 16, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: docs/docs/100-reference/01-command-line/acorn_run.md
+39-77Lines changed: 39 additions & 77 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,99 +12,61 @@ acorn run [flags] IMAGE|DIRECTORY [acorn args]
12
12
### Examples
13
13
14
14
```
15
-
# Publish and Expose Port Syntax
16
-
# Publish port 80 for any containers that define it as a port
17
-
acorn run -p 80 .
18
15
19
-
# Publish container "myapp" using the hostname app.example.com
20
-
acorn run --publish app.example.com:myapp .
16
+
# Build and run from a directory
17
+
acorn run .
21
18
22
-
# Expose port 80 to the rest of the cluster as port 8080
23
-
acorn run --expose 8080:80/http .
19
+
# Run from an image
20
+
acorn run ghcr.io/acorn-io/library/hello-world
24
21
25
-
# Labels and Annotations Syntax
26
-
# Add a label to all resources created by the app
27
-
acorn run --label key=value .
22
+
# Automatic upgrades
23
+
# Automatic upgrade for an app will be enabled if '#', '*', or '**' appears in the image's tag. Tags will be sorted according to the rules for these special characters described below. The newest tag will be selected for upgrade.
24
+
25
+
# '#' denotes a segment of the image tag that should be sorted numerically when finding the newest tag.
28
26
29
-
# Add a label to resources created for all containers
30
-
acorn run --label containers:key=value .
27
+
# This example deploys the hello-world app with auto-upgrade enabled and matching all major, minor, and patch versions:
28
+
acorn run myorg/hello-world:v#.#.#
31
29
32
-
# Add a label to the resources created for the volume named "myvolume"
33
-
acorn run --label volumes:myvolume:key=value .
30
+
# '*' denotes a segment of the image tag that should sorted alphabetically when finding the latest tag.
31
+
32
+
# In this example, if you had a tag named alpha and a tag named zeta, zeta would be recognized as the newest:
33
+
acorn run myorg/hello-world:*
34
34
35
-
# Link Syntax
36
-
# Link the running acorn application named "mydatabase" into the current app, replacing the container named "db"
37
-
acorn run --link mydatabase:db .
35
+
# '**' denotes a wildcard. This segment of the image tag won't be considered when sorting. This is useful if your tags have a segment that is unpredictable.
36
+
37
+
# This example would sort numerically according to major and minor version (i.e. v1.2) and ignore anything following the "-":
38
+
acorn run myorg/hello-world:v#.#-**
38
39
39
-
# Secret Syntax
40
-
# Bind the acorn secret named "mycredentials" into the current app, replacing the secret named "creds". See "acorn secrets --help" for more info
41
-
acorn run --secret mycredentials:creds .
40
+
# NOTE: Depending on your shell, you may see errors when using '*' and '**'. Using quotes will tell the shell to ignore them so acorn can parse them:
41
+
acorn run "myorg/hello-world:v#.#-**"
42
42
43
-
# Volume Syntax
44
-
# Create the volume named "mydata" with a size of 5 gigabyes and using the "fast" storage class
45
-
acorn run --volume mydata,size=5G,class=fast .
43
+
# Automatic upgrades can be configured explicitly via a flag.
46
44
47
-
# Bind the acorn volume named "mydata" into the current app, replacing the volume named "data", See "acorn volumes --help for more info"
48
-
acorn run --volume mydata:data .
45
+
# In this example, the tag will always be "latest", but acorn will periodically check to see if new content has been pushed to that tag:
46
+
acorn run --auto-upgrade myorg/hello-world:latest
49
47
50
-
# Automatic upgrades
51
-
# Automatic upgrade for an app will be enabled if '#', '*', or '**' appears in the image's tag. Tags will sorted according to the rules for these special characters described below. The newest tag will be selected for upgrade.
52
-
53
-
# '#' denotes a segment of the image tag that should be sorted numerically when finding the newest tag.
54
-
# This example deploys the hello-world app with auto-upgrade enabled and matching all major, minor, and patch versions:
55
-
acorn run myorg/hello-world:v#.#.#
56
-
57
-
# '*' denotes a segment of the image tag that should sorted alphabetically when finding the latest tag.
58
-
# In this example, if you had a tag named alpha and a tag named zeta, zeta would be recognized as the newest:
59
-
acorn run myorg/hello-world:*
60
-
61
-
# '**' denotes a wildcard. This segment of the image tag won't be considered when sorting. This is useful if your tags have a segment that is unpredictable.
62
-
# This example would sort numerically according to major and minor version (ie v1.2) and ignore anything following the "-":
63
-
acorn run myorg/hello-world:v#.#-**
64
-
65
-
# NOTE: Depending on your shell, you may see errors when using '*' and '**'. Using quotes will tell the shell to ignore them so Acorn can parse them:
66
-
acorn run "myorg/hello-world:v#.#-**"
67
-
68
-
# Automatic upgrades can be configured explicitly via a flag.
69
-
# In this example, the tag will always be "latest", but acorn will periodically check to see if new content has been pushed to that tag:
70
-
acorn run --auto-upgrade myorg/hello-world:latest
71
-
72
-
# To have acorn notify you that an app has an upgrade available and require confirmation before proceeding, set the notify-upgrade flag:
73
-
acorn run --notify-upgrade myorg/hello-world:v#.#.# myapp
74
-
# To proceed with an upgrade you've been notified of:
75
-
acorn update --confirm-upgrade myapp
48
+
# To have acorn notify you that an app has an upgrade available and require confirmation before proceeding, set the notify-upgrade flag:
49
+
acorn run --notify-upgrade myorg/hello-world:v#.#.# myapp
76
50
51
+
# To proceed with an upgrade you've been notified of:
52
+
acorn update --confirm-upgrade myapp
77
53
```
78
54
79
55
### Options
80
56
81
57
```
82
-
--annotation strings Add annotations to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
83
-
--auto-upgrade Enabled automatic upgrades.
84
-
-b, --bidirectional-sync In interactive mode download changes in addition to uploading
85
-
--compute-class strings Set computeclass for a workload in the format of workload=computeclass. Specify a single computeclass to set all workloads. (ex foo=example-class or example-class)
86
-
-i, --dev Enable interactive dev mode: build image, stream logs/status in the foreground and stop on exit
87
-
-e, --env strings Environment variables to set on running containers
88
-
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
89
-
-h, --help help for run
90
-
--interval string If configured for auto-upgrade, this is the time interval at which to check for new releases (ex: 1h, 5m)
91
-
-l, --label strings Add labels to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
92
-
--link strings Link external app as a service in the current app (format app-name:container-name)
93
-
-m, --memory strings Set memory for a workload in the format of workload=memory. Only specify an amount to set all workloads. (ex foo=512Mi or 512Mi)
94
-
-n, --name string Name of app to create
95
-
--notify-upgrade If true and the app is configured for auto-upgrades, you will be notified in the CLI when an upgrade is available and must confirm it
96
-
-o, --output string Output API request without creating app (json, yaml)
97
-
--profile strings Profile to assign default values
98
-
-p, --publish strings Publish port of application (format [public:]private) (ex 81:80)
99
-
-P, --publish-all Publish all (true) or none (false) of the defined ports of application
100
-
-q, --quiet Do not print status
101
-
--region string Region in which to deploy the app, immutable
102
-
--replace Replace the app with only defined values, resetting undefined fields to default values
--annotation strings Add annotations to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
16
-
--auto-upgrade Enabled automatic upgrades.
17
-
--compute-class strings Set computeclass for a workload in the format of workload=computeclass. Specify a single computeclass to set all workloads. (ex foo=example-class or example-class)
18
-
--confirm-upgrade When an auto-upgrade app is marked as having an upgrade available, pass this flag to confirm the upgrade. Used in conjunction with --notify-upgrade.
19
-
-e, --env strings Environment variables to set on running containers
20
-
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
21
-
-h, --help help for update
22
-
--image string Acorn image name
23
-
--interval string If configured for auto-upgrade, this is the time interval at which to check for new releases (ex: 1h, 5m)
24
-
-l, --label strings Add labels to the app and the resources it creates (format [type:][name:]key=value) (ex k=v, containers:k=v)
25
-
--link strings Link external app as a service in the current app (format app-name:container-name)
26
-
-m, --memory strings Set memory for a workload in the format of workload=memory. Only specify an amount to set all workloads. (ex foo=512Mi or 512Mi)
27
-
-n, --name string Name of app to create
28
-
--notify-upgrade If true and the app is configured for auto-upgrades, you will be notified in the CLI when an upgrade is available and must confirm it
29
-
-o, --output string Output API request without creating app (json, yaml)
30
-
--profile strings Profile to assign default values
31
-
-p, --publish strings Publish port of application (format [public:]private) (ex 81:80)
32
-
-P, --publish-all Publish all (true) or none (false) of the defined ports of application
33
-
--pull Re-pull the app's image, which will cause the app to re-deploy if the image has changed
34
-
-q, --quiet Do not print status
35
-
--region string Region in which to deploy the app, immutable
36
-
--replace Replace the app with only defined values, resetting undefined fields to default values
--wait Wait for app to become ready before command exiting (default true)
15
+
--auto-upgrade Enabled automatic upgrades.
16
+
--confirm-upgrade When an auto-upgrade app is marked as having an upgrade available, pass this flag to confirm the upgrade. Used in conjunction with --notify-upgrade.
17
+
-f, --file string Name of the build file (default "DIRECTORY/Acornfile")
18
+
-h, --help help for update
19
+
-n, --name string Name of app to create
20
+
--notify-upgrade If true and the app is configured for auto-upgrades, you will be notified in the CLI when an upgrade is available and must confirm it
21
+
-o, --output string Output API request without creating app (json, yaml)
22
+
--profile strings Profile to assign default values
23
+
--pull Re-pull the app's image, which will cause the app to re-deploy if the image has changed
24
+
-q, --quiet Do not print status
25
+
--replace Replace the app with only defined values, resetting undefined fields to default values
26
+
--wait Wait for app to become ready before command exiting (default: true)
0 commit comments