Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit ea98797

Browse files
author
Antony MECHIN
committed
examples: Update hello-world.
Signed-off-by: Antony MECHIN <antony.mechin@docker.com>
1 parent b7527d0 commit ea98797

2 files changed

Lines changed: 28 additions & 22 deletions

File tree

examples/hello-world/README.md

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ $ ls -l
1515
-rw-r--r-- 1 hello-world.dockerapp
1616
$ cat hello-world.dockerapp
1717
# This section contains your application metadata.
18+
# Version of the application
1819
version: 0.1.0
20+
# Name of the application
1921
name: hello-world
20-
description: ""
21-
namespace: ""
22+
# A short description of the application
23+
description:
24+
# Namespace to use when pushing to a registry. This is typically your Hub username.
25+
#namespace: myHubUsername
26+
# List of application maitainers with name and email for each
2227
maintainers:
23-
- name: dimrok
24-
email: ""
28+
- name: user
29+
email:
30+
# Specify false here if your application doesn't support Swarm or Kubernetes
2531
targets:
2632
swarm: true
2733
kubernetes: true
@@ -39,7 +45,7 @@ Open `hello-world.dockerapp` with your favorite text editor.
3945

4046
### Edit metadata
4147

42-
Edit the `description` and `maintainers` fields in the metadata section.
48+
Edit the `description`, `namespace` and `maintainers` fields in the metadata section.
4349

4450
### Add variables to the compose file
4551

@@ -75,7 +81,7 @@ In the settings section, add every variables with the default value you want, e.
7581
---
7682
# This section contains the default values for your application settings.
7783
port: 8080
78-
text: hello world!
84+
text: Hello, World!
7985
```
8086
8187
### Render
@@ -86,11 +92,11 @@ Create a `render` directory and redirect the output of `docker-app render ...` t
8692

8793
```bash
8894
$ mkdir -p render
89-
$ docker-app render -s text="hello user" > render/docker-compose.yml
95+
$ docker-app render -s text="Hello user!" > render/docker-compose.yml
9096
```
9197

9298
### Deploy
9399

94-
You directly deploy your application by running `docker-app deploy --set text="hello user!"` or you can use the rendered version and run `docker stack deploy render/docker-compose.yml`.
100+
You directly deploy your application by running `docker-app deploy --set text="Hello user!"` or you can use the rendered version and run `docker stack deploy render/docker-compose.yml`.
95101

96102
`http://<ip_of_your_node>:8080` will display your message, e.g. http://127.0.0.1:8080 if you deployed locally.
Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
1-
#
2-
# Metadata.
3-
#
1+
# This section contains your application metadata.
2+
# Version of the application
43
version: 0.1.0
4+
# Name of the application
55
name: hello-world
6-
description: "Hello world!"
7-
namespace: "myhubuser"
6+
# A short description of the application
7+
description: "Hello, World!"
8+
# Namespace to use when pushing to a registry. This is typically your Hub username.
9+
namespace: myHubUsername
10+
# List of application maitainers with name and email for each
811
maintainers:
9-
- name: user
10-
email: "user@email.com"
12+
- name: user
13+
email: "user@email.com"
14+
# Specify false here if your application doesn't support Swarm or Kubernetes
1115
targets:
1216
swarm: true
1317
kubernetes: true
1418

1519
--
16-
#
17-
# Services.
18-
#
20+
# This section contains the Compose file that describes your application services.
1921
version: "3.6"
2022
services:
2123
hello:
@@ -25,8 +27,6 @@ services:
2527
- ${port}:5678
2628

2729
--
28-
#
29-
# Settings.
30-
#
30+
# This section contains the default values for your application settings.
3131
port: 8080
32-
text: hello world!
32+
text: Hello, World!

0 commit comments

Comments
 (0)