diff --git a/config-in-image/Dockerfile b/config-in-image/Dockerfile new file mode 100644 index 0000000..63a9a12 --- /dev/null +++ b/config-in-image/Dockerfile @@ -0,0 +1,5 @@ +FROM samtolmay/lowdefy + +COPY --chown=node:node ./.lowdefy/build /home/node/lowdefy/build + +CMD ["node", "/home/node/lowdefy/dist/server.js"] \ No newline at end of file diff --git a/config-in-image/README.md b/config-in-image/README.md new file mode 100644 index 0000000..aea5b48 --- /dev/null +++ b/config-in-image/README.md @@ -0,0 +1,13 @@ +# Config in image + +``` +lowdefy build +``` + +``` +docker build . -t +``` + +``` +docker run -p 443:443 +``` \ No newline at end of file diff --git a/config-in-image/lowdefy.yaml b/config-in-image/lowdefy.yaml new file mode 100644 index 0000000..f398fad --- /dev/null +++ b/config-in-image/lowdefy.yaml @@ -0,0 +1,51 @@ + +lowdefy: 3.16.5 +name: Lowdefy starter + +pages: + - id: welcome + type: PageHeaderMenu + properties: + title: Welcome + areas: + content: + justify: center + blocks: + - id: content_card + type: Card + style: + maxWidth: 800 + blocks: + - id: content + type: Result + properties: + title: Docker example + subTitle: Config in image + icon: + name: HeartTwoTone + color: '#f00' + areas: + extra: + blocks: + - id: docs_button + type: Button + properties: + size: large + title: Let's build something + color: '#1890ff' + events: + onClick: + - id: link_to_docs + type: Link + params: + url: https://docs.lowdefy.com + newWindow: true + footer: + blocks: + - id: footer + type: Paragraph + properties: + type: secondary + content: | + Made by a Lowdefy 🤖 + diff --git a/config-in-volume/README.md b/config-in-volume/README.md new file mode 100644 index 0000000..c43eb7d --- /dev/null +++ b/config-in-volume/README.md @@ -0,0 +1,18 @@ +# Config in volume + +``` +lowdefy build +``` + +``` +docker run \ + -p 443:443 \ + --name lowdefy \ + --mount type=volume,source=lowdefy-build,destination=/home/node/lowdefy/volumes/build \ + -e LOWDEFY_SERVER_CONFIGURATION_PATH=/home/node/lowdefy/volumes/build \ + +``` + +``` +docker cp ./.lowdefy/build lowdefy:/home/node/lowdefy/volumes/build +``` \ No newline at end of file diff --git a/config-in-volume/lowdefy.yaml b/config-in-volume/lowdefy.yaml new file mode 100644 index 0000000..b9ab787 --- /dev/null +++ b/config-in-volume/lowdefy.yaml @@ -0,0 +1,51 @@ + +lowdefy: 3.16.5 +name: Lowdefy starter + +pages: + - id: welcome + type: PageHeaderMenu + properties: + title: Welcome + areas: + content: + justify: center + blocks: + - id: content_card + type: Card + style: + maxWidth: 800 + blocks: + - id: content + type: Result + properties: + title: Docker example + subTitle: Config in volume + icon: + name: HeartTwoTone + color: '#f00' + areas: + extra: + blocks: + - id: docs_button + type: Button + properties: + size: large + title: Let's build something + color: '#1890ff' + events: + onClick: + - id: link_to_docs + type: Link + params: + url: https://docs.lowdefy.com + newWindow: true + footer: + blocks: + - id: footer + type: Paragraph + properties: + type: secondary + content: | + Made by a Lowdefy 🤖 + diff --git a/docker-compose/Dockerfile b/docker-compose/Dockerfile new file mode 100644 index 0000000..63a9a12 --- /dev/null +++ b/docker-compose/Dockerfile @@ -0,0 +1,5 @@ +FROM samtolmay/lowdefy + +COPY --chown=node:node ./.lowdefy/build /home/node/lowdefy/build + +CMD ["node", "/home/node/lowdefy/dist/server.js"] \ No newline at end of file diff --git a/docker-compose/README.md b/docker-compose/README.md new file mode 100644 index 0000000..e5b339f --- /dev/null +++ b/docker-compose/README.md @@ -0,0 +1,13 @@ +# Docker compose, config in image + +``` +lowdefy build +``` + +``` +docker compose build +``` + +``` +docker compose up +``` \ No newline at end of file diff --git a/docker-compose/docker-compose.yaml b/docker-compose/docker-compose.yaml new file mode 100644 index 0000000..c72bbc4 --- /dev/null +++ b/docker-compose/docker-compose.yaml @@ -0,0 +1,7 @@ +version: "3.8" +services: + lowdefy: + build: . + ports: + - "443:443" + diff --git a/docker-compose/lowdefy.yaml b/docker-compose/lowdefy.yaml new file mode 100644 index 0000000..db9f8eb --- /dev/null +++ b/docker-compose/lowdefy.yaml @@ -0,0 +1,51 @@ + +lowdefy: 3.16.5 +name: Lowdefy starter + +pages: + - id: welcome + type: PageHeaderMenu + properties: + title: Welcome + areas: + content: + justify: center + blocks: + - id: content_card + type: Card + style: + maxWidth: 800 + blocks: + - id: content + type: Result + properties: + title: Docker example + subTitle: Docker compose - config in image + icon: + name: HeartTwoTone + color: '#f00' + areas: + extra: + blocks: + - id: docs_button + type: Button + properties: + size: large + title: Let's build something + color: '#1890ff' + events: + onClick: + - id: link_to_docs + type: Link + params: + url: https://docs.lowdefy.com + newWindow: true + footer: + blocks: + - id: footer + type: Paragraph + properties: + type: secondary + content: | + Made by a Lowdefy 🤖 +