forked from acorn-io/kubecon-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAcornfile
83 lines (75 loc) · 1.7 KB
/
Acornfile
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
args: {
// Run tests
tests: false
}
containers: {
api: {
build: {
context: "./api"
if args.dev {
dockerfile: "./api/Dockerfile.dev"
}
}
if args.dev {
dirs: "/app": "./api/"
}
probe: "http://localhost:5000/app/healthz"
ports: "5000/http"
dependsOn: ["nats", "mongo"]
}
ws: {
build: "./ws"
probes: {}
ports: "8080/http"
dependsOn: ["nats", "mongo"]
}
mongo: {
image: "public.ecr.aws/docker/library/mongo:4.4"
ports: 27017
dirs: "/data/db": "mongo-data"
}
nats: {
image: "public.ecr.aws/docker/library/nats:2.8-alpine"
ports: 4222
}
swagger:{
image: "swaggerapi/swagger-ui:v4.14.0"
environment: {
BASE_URL: "/docs"
}
dirs: "/app/swagger.json": "./web-hook/conf/openapi.yaml"
ports: "8080/http"
dependsOn: ["nats", "mongo"]
}
www: {
build: "./www"
dependsOn: ["nats", "mongo"]
probe: "http://localhost:3000"
ports: "3000/http"
if args.dev {
command: ["npm", "run", "dev"]
dirs: "/app": "./www"
}
}
}
routers: {
default: {
routes: {
"/": "www:3000"
"/docs": "swagger:8080"
"/ws": "ws:8080"
"/wh": "api:5000"
"/data": "api:5000"
"/stats": "api:5000"
}
}
}
if args.tests {
jobs: test: {
build: {
context: "./api"
dockerfile: "./api/Dockerfile.test"
}
dependsOn: ["www", "api", "ws"]
}
}