summaryrefslogtreecommitdiffstats
path: root/recipes-demo
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-demo')
-rw-r--r--recipes-demo/helloworld-flask/helloworld-flask_0.1.bb21
-rw-r--r--recipes-demo/images/app-container-curl.bb2
-rw-r--r--recipes-demo/images/app-container.bb2
3 files changed, 14 insertions, 11 deletions
diff --git a/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb b/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb
index 896e45fd..043ccc52 100644
--- a/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb
+++ b/recipes-demo/helloworld-flask/helloworld-flask_0.1.bb
@@ -16,23 +16,26 @@ CONTAINERIMAGE ?= "zeddii/app-container:latest"
16CONTAINERPORT ?= "9000" 16CONTAINERPORT ?= "9000"
17EXTERNALPORT ?= "10000" 17EXTERNALPORT ?= "10000"
18 18
19S = "${WORKDIR}/sources"
20UNPACKDIR = "${S}"
21
19do_install() { 22do_install() {
20 23
21 for tgt in flask-app.yaml flask-app-service.yaml; do 24 for tgt in flask-app.yaml flask-app-service.yaml; do
22 sed -i 's%\@NAME\@%${NAME}%g' ${WORKDIR}/$tgt 25 sed -i 's%\@NAME\@%${NAME}%g' ${UNPACKDIR}/$tgt
23 sed -i 's%\@APPNAME\@%${APPNAME}%g' ${WORKDIR}/$tgt 26 sed -i 's%\@APPNAME\@%${APPNAME}%g' ${UNPACKDIR}/$tgt
24 sed -i 's%\@CONTAINERNAME\@%${CONTAINERNAME}%g' ${WORKDIR}/$tgt 27 sed -i 's%\@CONTAINERNAME\@%${CONTAINERNAME}%g' ${UNPACKDIR}/$tgt
25 sed -i 's%\@CONTAINERIMAGE\@%${CONTAINERIMAGE}%g' ${WORKDIR}/$tgt 28 sed -i 's%\@CONTAINERIMAGE\@%${CONTAINERIMAGE}%g' ${UNPACKDIR}/$tgt
26 sed -i 's%\@CONTAINERPORT\@%${CONTAINERPORT}%g' ${WORKDIR}/$tgt 29 sed -i 's%\@CONTAINERPORT\@%${CONTAINERPORT}%g' ${UNPACKDIR}/$tgt
27 sed -i 's%\@EXTERNALPORT\@%${EXTERNALPORT}%g' ${WORKDIR}/$tgt 30 sed -i 's%\@EXTERNALPORT\@%${EXTERNALPORT}%g' ${UNPACKDIR}/$tgt
28 done 31 done
29 32
30 install -d ${D}${bindir}/ 33 install -d ${D}${bindir}/
31 install -m 755 ${WORKDIR}/flask-app ${D}${bindir}/ 34 install -m 755 ${UNPACKDIR}/flask-app ${D}${bindir}/
32 35
33 install -d ${D}${sysconfdir}/deploy 36 install -d ${D}${sysconfdir}/deploy
34 install -m 644 ${WORKDIR}/flask-app.yaml ${D}${sysconfdir}/ 37 install -m 644 ${UNPACKDIR}/flask-app.yaml ${D}${sysconfdir}/
35 install -m 644 ${WORKDIR}/flask-app-service.yaml ${D}${sysconfdir}/ 38 install -m 644 ${UNPACKDIR}/flask-app-service.yaml ${D}${sysconfdir}/
36} 39}
37 40
38RDEPENDS:${PN} += "python3-core python3-flask" 41RDEPENDS:${PN} += "python3-core python3-flask"
diff --git a/recipes-demo/images/app-container-curl.bb b/recipes-demo/images/app-container-curl.bb
index 51451300..ddeb3022 100644
--- a/recipes-demo/images/app-container-curl.bb
+++ b/recipes-demo/images/app-container-curl.bb
@@ -43,4 +43,4 @@ OCI_IMAGE_TAG = "easy"
43OCI_IMAGE_ENTRYPOINT_ARGS = "http://localhost:80" 43OCI_IMAGE_ENTRYPOINT_ARGS = "http://localhost:80"
44CONTAINER_SHELL = "busybox" 44CONTAINER_SHELL = "busybox"
45 45
46IMAGE_INSTALL:append = "curl" 46IMAGE_INSTALL:append = " curl"
diff --git a/recipes-demo/images/app-container.bb b/recipes-demo/images/app-container.bb
index 22d2ab9f..8188d57a 100644
--- a/recipes-demo/images/app-container.bb
+++ b/recipes-demo/images/app-container.bb
@@ -7,7 +7,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
7OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app" 7OCI_IMAGE_ENTRYPOINT = "/usr/bin/flask-app"
8CONTAINER_SHELL = "busybox" 8CONTAINER_SHELL = "busybox"
9 9
10IMAGE_INSTALL:append = "helloworld-flask" 10IMAGE_INSTALL:append = " helloworld-flask"
11 11
12IMAGE_FSTYPES = "container oci" 12IMAGE_FSTYPES = "container oci"
13inherit image 13inherit image