-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.pkl
More file actions
38 lines (34 loc) · 777 Bytes
/
main.pkl
File metadata and controls
38 lines (34 loc) · 777 Bytes
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
/*
* Basic Example
*
* This example shows how to define Docker Compose stacks using the compose plugin.
* Run with: formae apply --mode reconcile --watch examples/basic/main.pkl
*/
amends "@formae/forma.pkl"
import "@formae/formae.pkl"
import "@compose/compose.pkl"
forma {
new formae.Stack {
label = "default"
description = "Default stack for Docker Compose resources"
}
new formae.Target {
label = "local-docker"
namespace = "DOCKER"
config = new compose.Config {}
}
new compose.Stack {
label = "my-app"
projectName = "my-app"
composeFile = #"""
services:
web:
image: nginx:alpine
ports:
- "8080:80"
"""#
endpoints = new Mapping {
["web"] = "web:80"
}
}
}