Skip to content
This repository has been archived by the owner on Jan 5, 2024. It is now read-only.

Commit

Permalink
feat: Init docker examples
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTolmay committed Jun 1, 2021
1 parent 6ffcb98 commit cd51cd9
Show file tree
Hide file tree
Showing 9 changed files with 214 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config-in-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
13 changes: 13 additions & 0 deletions config-in-image/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Config in image

```
lowdefy build
```

```
docker build . -t <tag-name>
```

```
docker run -p 443:443 <tag-name>
```
51 changes: 51 additions & 0 deletions config-in-image/lowdefy.yaml
Original file line number Diff line number Diff line change
@@ -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 🤖
18 changes: 18 additions & 0 deletions config-in-volume/README.md
Original file line number Diff line number Diff line change
@@ -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 \
<tag-name>
```

```
docker cp ./.lowdefy/build lowdefy:/home/node/lowdefy/volumes/build
```
51 changes: 51 additions & 0 deletions config-in-volume/lowdefy.yaml
Original file line number Diff line number Diff line change
@@ -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 🤖
5 changes: 5 additions & 0 deletions docker-compose/Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
13 changes: 13 additions & 0 deletions docker-compose/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Docker compose, config in image

```
lowdefy build
```

```
docker compose build
```

```
docker compose up
```
7 changes: 7 additions & 0 deletions docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
version: "3.8"
services:
lowdefy:
build: .
ports:
- "443:443"

51 changes: 51 additions & 0 deletions docker-compose/lowdefy.yaml
Original file line number Diff line number Diff line change
@@ -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 🤖

0 comments on commit cd51cd9

Please sign in to comment.