Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ fi

echo "🏗️ Preparing to build edgeapps: $ACTIVE_APPS"

# For each active app, add a `-f <app>/edgebox-compose.yml` argument to the `docker-compose` command
# For each active app, add a `-f <app>/edgebox-compose.yml` argument to the `docker compose` command
for app in $ACTIVE_APPS; do
DOCKER_COMPOSE_ARGS="$DOCKER_COMPOSE_ARGS -f $app/edgebox-compose.yml"
done
Expand All @@ -29,6 +29,6 @@ DOCKER_COMPOSE_ARGS="$DOCKER_COMPOSE_ARGS -f compose.yml"

echo "🐳 Building operations:"
echo ""
docker-compose $DOCKER_COMPOSE_ARGS build
docker compose $DOCKER_COMPOSE_ARGS build

echo "\n🟢 Operations completed."
6 changes: 3 additions & 3 deletions .scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ -n "$1" ]; then
ACTIVE_APPS=$1
fi

# For each active app, add a `-f <app>/edgebox-compose.yml` argument to the `docker-compose` command
# For each active app, add a `-f <app>/edgebox-compose.yml` argument to the `docker compose` command
DOCKER_COMPOSE_ARGS="$DOCKER_COMPOSE_ARGS -f compose.yml"
PUBLISH_DOMAINS="false"
hosts_file_content=""
Expand Down Expand Up @@ -80,8 +80,8 @@ if [ "$PUBLISH_DOMAINS" = "false" ]; then
fi

echo "🐳 Setting up Containers:\n"
# I want to put a - in front of the first line of output from docker-compose
docker-compose $DOCKER_COMPOSE_ARGS up -d --remove-orphans
# I want to put a - in front of the first line of output from docker compose
docker compose $DOCKER_COMPOSE_ARGS up -d --remove-orphans
echo ""

# Unpack the domains list as \n - separated string
Expand Down
2 changes: 1 addition & 1 deletion .scripts/status.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
echo "🗺️ Status of local edgeapps:"
echo ""
docker-compose ps
docker compose ps
6 changes: 3 additions & 3 deletions .scripts/stop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ if [ -z "$SERVICES_TO_STOP" ]; then
else
echo "✋ Stopping local edgeapp services: $SERVICES_TO_STOP"
fi
# For each active app, add a `-f <app>/edgebox-compose.yml` argument to the `docker-compose` command
# For each active app, add a `-f <app>/edgebox-compose.yml` argument to the `docker compose` command
DOCKER_COMPOSE_ARGS="$DOCKER_COMPOSE_ARGS -f compose.yml"

for app in $ACTIVE_APPS; do
Expand All @@ -31,7 +31,7 @@ done

echo ""

# Docker-compose should stop $active_app-* containers for each active app
docker-compose $DOCKER_COMPOSE_ARGS down $SERVICES_TO_STOP
# Docker compose should stop $active_app-* containers for each active app
docker compose $DOCKER_COMPOSE_ARGS down $SERVICES_TO_STOP

echo "\n🟢 Operations completed."
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ $ ./ws -b
> To use WS to build these applications manually without a properly working Edgebox system (that includes the `api` and `edgeboxctl`), you need to manually set the desired environment and lock files for each app prior to starting the build process, otherwise it will not work as expected. Check below for more details on manual configuration of apps 👇

This will go through each folder in the `/home/system/components/apps/` folder, and configure the containers for each valid app entry.
After running this command, You should have a `docker-compose.yml` file in the the root of the ws repository (it is git igored) with the final generated configuration which will then be used to spawn the containers via the `docker-compose up -d` command.
After running this command, You should have a `docker-compose.yml` file in the the root of the ws repository (it is git igored) with the final generated configuration which will then be used to spawn the containers via the `docker compose up -d` command.
The containers will also automatically start, and be available on the configured `VIRTUAL_HOST` of each app, given you've also setup all the necessary dependencies for `ws`.

Check the [ws repository](https://github.com/edgebox-iot/ws) for more information on how `ws` works.
1 change: 1 addition & 0 deletions campfire/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
appdata/*
4 changes: 4 additions & 0 deletions campfire/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ghcr.io/basecamp/once-campfire:latest
LABEL org.opencontainers.image.description="Campfire is a simple, self-hosted team chat application."

EXPOSE 80 443
3 changes: 3 additions & 0 deletions campfire/edgeapp.template.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CAMPFIRE_SECRET_KEY_BASE=string|true|Secret key used for cryptographic signing (generate with: openssl rand -hex 64)
CAMPFIRE_VAPID_PUBLIC_KEY=string|false|VAPID public key for Web Push notifications
CAMPFIRE_VAPID_PRIVATE_KEY=string|false|VAPID private key for Web Push notifications
21 changes: 21 additions & 0 deletions campfire/edgebox-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: "3"
services:
##############
# Campfire EdgeApp
##############
campfire-ws:
image: ghcr.io/edgebox-iot/apps/campfire:1.0.0
build:
context: "./"
container_name: '${COMPOSE_PROJECT_NAME-edgebox}-campfire-ws'
environment:
VIRTUAL_HOST: ${LOCAL_URL}${INTERNET_URL}
VIRTUAL_PORT: 80
DISABLE_SSL: "true"
SECRET_KEY_BASE: '${CAMPFIRE_SECRET_KEY_BASE}'
VAPID_PUBLIC_KEY: '${CAMPFIRE_VAPID_PUBLIC_KEY}'
VAPID_PRIVATE_KEY: '${CAMPFIRE_VAPID_PRIVATE_KEY}'
volumes:
- ./appdata/storage:/rails/storage:rw
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
1 change: 1 addition & 0 deletions campfire/edgebox-hosts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
campfire
11 changes: 11 additions & 0 deletions campfire/edgebox.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
############################################
# Edgebox api compose environment variables
############################################

EDGEAPP_NAME=Campfire
EDGEAPP_DESCRIPTION=Team Chat
EDGEAPP_EXPERIMENTAL=true
EDGEAPP_VERSION=1.0.0

# To determine the name of your containers
COMPOSE_PROJECT_NAME=edgebox
1 change: 1 addition & 0 deletions collabora/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
appdata/*
7 changes: 7 additions & 0 deletions collabora/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@

# Base image to base the app container on
FROM collabora/code
LABEL org.opencontainers.image.description Collabora Office is a powerful office suite that supports all major document, spreadsheet and presentation file formats.

# Port to expose from the container into the host
EXPOSE 9980
31 changes: 31 additions & 0 deletions collabora/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Collabora Office Office Suite

This is a simple edgeapp template that demonstrates how to create an edgeapp that runs "Collabora Office" when accessed.
It makes use of environment files, configurations and directories to demonstrate the customization capabilities for building and expanding self-hosted apps.

## Directory Structure

### Editable Files

These files make the structure of an edgeapp and can be edited to customize the edgeapp installation, runtime, and configuration.

- /src -> Source directory
- /src/build/ -> Files to be added to the container images build
- /src/install/ -> Files to be used with edgebox-postinstall.sh (ran after install)
- edgebox.env -> Environment file for the edgeapp, used to set container environment variables and meta data
- edgeapp.template.env -> Template environment file for the edgeapp, used to set Dashboard GUI configuration options
- edgebox-postinstall.sh -> Script ran after the edgeapp is fresh installed
- edgebox-hosts.txt -> Subdomain host names to be published by the edgeapp
- edgebox-compose.yml -> Defines the edgeapp services, containers, build, configuration, volumes, etc.
- Dockerfile - The Docker image used to build the edgeapp container image
- /README.md -> This file

### Dynamically Managed Files

These files do not exist initially, but can be created dynamically and are managed by the edgeapp and should not be edited manually.

- /appdata -> Holds running app data, directory used to hold container volumes
- .run -> Placeholder file to indicate this app should run upon edgebox containers status check
- edgeapp.env -> Environment file for the edgeapp, used to set container environment variables
- myedgeapp.env -> Environment file for the externally accessible domain, used to set container internet connectivity and domain configuration
- edgebox-postinstall.done -> Placeholder file to indicate the edgeapp post-install has ben ran previously
24 changes: 24 additions & 0 deletions collabora/edgebox-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
services:
##############
# Collabora Office EdgeApp
##############
collabora-ws:
image: ghcr.io/edgebox-iot/apps/${COMPOSE_APP_SLUG-collabora}:1.0.0
build:
context: "./"
container_name: '${COMPOSE_PROJECT_NAME-edgebox}-${COMPOSE_APP_SLUG-collabora}-ws'
restart: unless-stopped
environment:
# WS Proxy control varialbles - Do not change
VIRTUAL_HOST: ${LOCAL_URL-collabora.local}${INTERNET_URL-}
VIRTUAL_PORT: 9980
# Overridable variables (optional)
# VIRTUAL_PORT: 80
# VIRTUAL_PROTO: https
# VIRTUAL_PATH: /
# VIRTUAL_DEST: /

volumes:
# Recommended defaults
- /etc/localtime:/etc/localtime:ro

1 change: 1 addition & 0 deletions collabora/edgebox-hosts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
collabora
Binary file added collabora/edgebox-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions collabora/edgebox-postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# mkdir -p ./appdata/collabora-ws
echo "📦 collabora postinstall script"
echo "- Running in $(pwd)"
1 change: 1 addition & 0 deletions collabora/edgebox-postinstall.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-T collabora-ws pwd
14 changes: 14 additions & 0 deletions collabora/edgebox.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
############################################
# Edgebox WS and API environment variables
############################################

# Metadata values - Used by edgebox api service for UI and update control purposes
EDGEAPP_NAME=Collabora Office
EDGEAPP_DESCRIPTION=Office Suite
EDGEAPP_VERSION=1.0.0

# Compose values - Used by edgebox ws service for containers setup
COMPOSE_PROJECT_NAME=edgebox
COMPOSE_APP_SLUG=collabora


1 change: 1 addition & 0 deletions fizzy/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
appdata/*
4 changes: 4 additions & 0 deletions fizzy/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM ghcr.io/basecamp/fizzy:main
LABEL org.opencontainers.image.description="Fizzy is a simple project management tool using Kanban boards."

EXPOSE 80 443
9 changes: 9 additions & 0 deletions fizzy/edgeapp.template.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FIZZY_SECRET_KEY_BASE=string|true|Secret key used for cryptographic signing (generate with: openssl rand -hex 64)
FIZZY_BASE_URL=string|false|The public URL of your Fizzy instance (e.g. http://fizzy.local)
FIZZY_VAPID_PUBLIC_KEY=string|false|VAPID public key for Web Push notifications
FIZZY_VAPID_PRIVATE_KEY=string|false|VAPID private key for Web Push notifications
FIZZY_SMTP_ADDRESS=string|false|SMTP server address for sending emails
FIZZY_SMTP_PORT=string|false|SMTP server port
FIZZY_SMTP_USERNAME=string|false|SMTP username
FIZZY_SMTP_PASSWORD=string|false|SMTP password
FIZZY_MAILER_FROM_ADDRESS=string|false|From address for emails sent by Fizzy
27 changes: 27 additions & 0 deletions fizzy/edgebox-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
version: "3"
services:
##############
# Fizzy EdgeApp
##############
fizzy-ws:
image: ghcr.io/edgebox-iot/apps/fizzy:1.0.0
build:
context: "./"
container_name: '${COMPOSE_PROJECT_NAME-edgebox}-fizzy-ws'
environment:
VIRTUAL_HOST: ${LOCAL_URL}${INTERNET_URL}
VIRTUAL_PORT: 80
DISABLE_SSL: "true"
SECRET_KEY_BASE: '${FIZZY_SECRET_KEY_BASE}'
BASE_URL: '${FIZZY_BASE_URL}'
VAPID_PUBLIC_KEY: '${FIZZY_VAPID_PUBLIC_KEY}'
VAPID_PRIVATE_KEY: '${FIZZY_VAPID_PRIVATE_KEY}'
SMTP_ADDRESS: '${FIZZY_SMTP_ADDRESS}'
SMTP_PORT: '${FIZZY_SMTP_PORT}'
SMTP_USERNAME: '${FIZZY_SMTP_USERNAME}'
SMTP_PASSWORD: '${FIZZY_SMTP_PASSWORD}'
MAILER_FROM_ADDRESS: '${FIZZY_MAILER_FROM_ADDRESS}'
volumes:
- ./appdata/storage:/rails/storage:rw
- /etc/localtime:/etc/localtime:ro
restart: unless-stopped
1 change: 1 addition & 0 deletions fizzy/edgebox-hosts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
fizzy
11 changes: 11 additions & 0 deletions fizzy/edgebox.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
############################################
# Edgebox api compose environment variables
############################################

EDGEAPP_NAME=Fizzy
EDGEAPP_DESCRIPTION=Project Management
EDGEAPP_EXPERIMENTAL=true
EDGEAPP_VERSION=1.0.0

# To determine the name of your containers
COMPOSE_PROJECT_NAME=edgebox
1 change: 1 addition & 0 deletions hello/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
appdata/*
10 changes: 10 additions & 0 deletions hello/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

# Base image to base the app container on
FROM nginxdemos/hello:0.4
LABEL org.opencontainers.image.description Hello is a scaffolding edgeapp template.

# Add / Replace Files in the Container
ADD ./src/build/hello.conf /etc/nginx/conf.d/

# Port to expose from the container into the host
EXPOSE 80
31 changes: 31 additions & 0 deletions hello/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Hello World Edgeapp Template

This is a simple edgeapp template that demonstrates how to create an edgeapp that runs a "Hello World" when accessed.
It makes use of environment files, configurations and directories to demonstrate the customization capabilities for building and expanding self-hosted apps.

## Directory Structure

### Editable Files

These files make the structure of an edgeapp and can be edited to customize the edgeapp installation, runtime, and configuration.

- /src -> Source directory
- /src/build/ -> Files to be added to the container images build
- /src/install/ -> Files to be used with edgebox-postinstall.sh (ran after install)
- edgebox.env -> Environment file for the edgeapp, used to set container environment variables and meta data
- edgeapp.template.env -> Template environment file for the edgeapp, used to set Dashboard GUI configuration options
- edgebox-postinstall.sh -> Script ran after the edgeapp is fresh installed
- edgebox-hosts.txt -> Subdomain host names to be published by the edgeapp
- edgebox-compose.yml -> Defines the edgeapp services, containers, build, configuration, volumes, etc.
- Dockerfile - The Docker image used to build the edgeapp container image
- /README.md -> This file

### Dynamically Managed Files

These files do not exist initially, but can be created dynamically and are managed by the edgeapp and should not be edited manually.

- /appdata -> Holds running app data, directory used to hold container volumes
- .run -> Placeholder file to indicate this app should run upon edgebox containers status check
- edgeapp.env -> Environment file for the edgeapp, used to set container environment variables
- myedgeapp.env -> Environment file for the externally accessible domain, used to set container internet connectivity and domain configuration
- edgebox-postinstall.done -> Placeholder file to indicate the edgeapp post-install has ben ran previously
2 changes: 2 additions & 0 deletions hello/edgeapp.template.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
HELLO_EXAMPLE_BOOLEAN_OPTION=bool|true|Toggle Example Option
HELLO_EXAMPLE_REQUIRED_FIELD_OPTION=string|true|A Required secret option
26 changes: 26 additions & 0 deletions hello/edgebox-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
version: "3"
services:
##############
# Hello World EdgeApp
##############
hello-ws:
image: ghcr.io/edgebox-iot/apps/${COMPOSE_APP_SLUG-hello}:1.0.0
build:
context: "./"
container_name: '${COMPOSE_PROJECT_NAME-edgebox}-${COMPOSE_APP_SLUG-hello}-ws'
restart: unless-stopped
environment:
# WS Proxy control varialbles - Do not change
VIRTUAL_HOST: ${LOCAL_URL}${INTERNET_URL}
# Overridable variables (optional)
# VIRTUAL_PORT: 80
# VIRTUAL_PROTO: https
# VIRTUAL_PATH: /
# VIRTUAL_DEST: /

volumes:
# Recommended defaults
- /etc/localtime:/etc/localtime:ro
# Host data volume (Modify as needed by the app)
- ./appdata/${COMPOSE_APP_SLUG-hello}-ws:/usr/share/nginx/html/:rw

1 change: 1 addition & 0 deletions hello/edgebox-hosts.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
hello
Binary file added hello/edgebox-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions hello/edgebox-postinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# mkdir -p ./appdata/hello-ws
echo "📦 Hello World postinstall script"
echo "- Running in $(pwd)"
echo "- Copying files to ./appdata/hello-ws"
cp ./src/install/* ./appdata/hello-ws/
1 change: 1 addition & 0 deletions hello/edgebox-postinstall.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-T hello-ws pwd
14 changes: 14 additions & 0 deletions hello/edgebox.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
############################################
# Edgebox WS and API environment variables
############################################

# Metadata values - Used by edgebox api service for UI and update control purposes
EDGEAPP_NAME=Hello World
EDGEAPP_DESCRIPTION=Edgeapp Template
EDGEAPP_VERSION=1.0.0

# Compose values - Used by edgebox ws service for containers setup
COMPOSE_PROJECT_NAME=edgebox
COMPOSE_APP_SLUG=hello


16 changes: 16 additions & 0 deletions hello/src/build/hello.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
server {
listen 80;
listen [::]:80;

root /usr/share/nginx/html;
try_files /index.html =404;

expires -1;

sub_filter_once off;
sub_filter 'server_hostname' '$hostname';
sub_filter 'server_address' '$server_addr:$server_port';
sub_filter 'server_url' '$request_uri';
sub_filter 'server_date' '$time_local';
sub_filter 'request_id' '$request_id';
}
96 changes: 96 additions & 0 deletions hello/src/install/index.html

Large diffs are not rendered by default.

Loading