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

Commit a0c9586

Browse files
author
Matthieu Nottale
committed
README: Update in single file mode, add a section about that.
Signed-off-by: Matthieu Nottale <[email protected]>
1 parent 6954939 commit a0c9586

File tree

1 file changed

+40
-3
lines changed

1 file changed

+40
-3
lines changed

README.md

Lines changed: 40 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,52 @@ services:
2929
With `docker-app` installed let's create an Application Package based on this Compose file:
3030

3131
```bash
32-
$ docker-app init hello
32+
$ docker-app init -s hello
3333
$ ls
3434
docker-compose.yml
3535
hello.dockerapp
3636
```
3737

38-
We created a few files in the `.dockerapp` folder. Let's edit the `hello.dockerapp/settings.yml` and add the following default values for our application:
38+
We created a new file `hello.dockerapp` that contains three YAML documents:
39+
- metadatas
40+
- the Compose file
41+
- settings for your application
42+
43+
It should look like this:
44+
45+
```yaml
46+
version: 0.1.0
47+
name: hello
48+
description: ""
49+
maintainers:
50+
- name: yourusername
51+
email: ""
52+
targets:
53+
swarm: true
54+
kubernetes: true
55+
56+
--
57+
version: '3.2'
58+
services:
59+
hello:
60+
image: hashicorp/http-echo
61+
command: ["-text", "hello world"]
62+
ports:
63+
- 5678:5678
64+
65+
--
66+
{}
67+
```
68+
69+
Let's edit the settings section and add the following default values for our application:
3970

4071
```yaml
4172
port: 5678
4273
text: hello development
4374
version: latest
4475
```
4576

46-
Then modify the Compose file in the `.dockerapp` folder, adding in the variables.
77+
Then modify the Compose file section in `hello.dockerapp`, adding in the variables.
4778

4879
```yaml
4980
version: '3.2'
@@ -135,6 +166,12 @@ This will create a folder, `<my-applcation-name>.chart`, in the current director
135166

136167
_Note that this requires the Compose Kubernetes controller available in Docker for Windows and Docker for Mac, and in Docker Enterprise Edition._
137168

169+
## Single file or directory representation
170+
171+
If you prefer having the three documents in separate YAML files, omit the `-s` option to
172+
the `docker-app init` command. This will create a directory instead of a singe file, containing
173+
`metadata.yml`, `docker-compose.yml` and `settings.yml`.
174+
138175

139176
## Next steps
140177

0 commit comments

Comments
 (0)