From cc281ecea5c265e3f42336f714a8a60df76553a5 Mon Sep 17 00:00:00 2001 From: BinkyTwin Date: Wed, 20 May 2026 22:33:59 +0200 Subject: [PATCH] feat: add OpenSourcePOS template --- blueprints/opensourcepos/docker-compose.yml | 45 ++++++++++++++++++ blueprints/opensourcepos/opensourcepos.svg | 9 ++++ blueprints/opensourcepos/template.toml | 51 +++++++++++++++++++++ meta.json | 19 ++++++++ 4 files changed, 124 insertions(+) create mode 100644 blueprints/opensourcepos/docker-compose.yml create mode 100644 blueprints/opensourcepos/opensourcepos.svg create mode 100644 blueprints/opensourcepos/template.toml diff --git a/blueprints/opensourcepos/docker-compose.yml b/blueprints/opensourcepos/docker-compose.yml new file mode 100644 index 000000000..95d589603 --- /dev/null +++ b/blueprints/opensourcepos/docker-compose.yml @@ -0,0 +1,45 @@ +version: "3.8" + +services: + opensourcepos: + image: jekkos/opensourcepos:master + restart: unless-stopped + depends_on: + opensourcepos-db: + condition: service_healthy + expose: + - "80" + environment: + CI_ENVIRONMENT: production + ALLOWED_HOSTNAMES: ${ALLOWED_HOSTNAMES} + FORCE_HTTPS: ${FORCE_HTTPS} + PHP_TIMEZONE: ${PHP_TIMEZONE} + MYSQL_USERNAME: ${MYSQL_USER} + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + MYSQL_DB_NAME: ${MYSQL_DATABASE} + MYSQL_HOST_NAME: opensourcepos-db + volumes: + - opensourcepos-uploads:/app/public/uploads + - opensourcepos-logs:/app/writable/logs + + opensourcepos-db: + image: mariadb:10.11 + restart: unless-stopped + environment: + MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD} + MYSQL_DATABASE: ${MYSQL_DATABASE} + MYSQL_USER: ${MYSQL_USER} + MYSQL_PASSWORD: ${MYSQL_PASSWORD} + volumes: + - opensourcepos-db:/var/lib/mysql + healthcheck: + test: ["CMD-SHELL", "healthcheck.sh --connect --innodb_initialized"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + +volumes: + opensourcepos-db: + opensourcepos-uploads: + opensourcepos-logs: diff --git a/blueprints/opensourcepos/opensourcepos.svg b/blueprints/opensourcepos/opensourcepos.svg new file mode 100644 index 000000000..d63b2009c --- /dev/null +++ b/blueprints/opensourcepos/opensourcepos.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/blueprints/opensourcepos/template.toml b/blueprints/opensourcepos/template.toml new file mode 100644 index 000000000..d925ad0c0 --- /dev/null +++ b/blueprints/opensourcepos/template.toml @@ -0,0 +1,51 @@ +[variables] +main_domain = "${domain}" +mysql_root_password = "${password:32}" +mysql_password = "${password:32}" +php_timezone = "UTC" +force_https = "false" +allowed_hostnames = "${main_domain}" + +[[config.domains]] +serviceName = "opensourcepos" +port = 80 +host = "${main_domain}" +path = "/" + +[[config.mounts]] +filePath = "README.md" +content = """# OpenSourcePOS + +This template deploys Open Source Point of Sale with MariaDB using the upstream Docker image and persistent storage for uploads, logs, and database data. + +## Access + +- URL: `http://${main_domain}` +- Default application user: `admin` +- Default application password: `pointofsale` + +Change the default application password immediately after the first login. + +## Hostnames and HTTPS + +OpenSourcePOS validates incoming host headers in production. The `allowed_hostnames` variable defaults to `${main_domain}` and can be set to a comma-separated list such as `pos.example.com,www.pos.example.com`. + +The template defaults `force_https` to `false` because Dokploy terminates TLS outside the container. Set it to `true` only when your deployment always reaches OpenSourcePOS through HTTPS and the reverse proxy sends the expected headers. + +## Storage + +The template creates persistent volumes for: + +- MariaDB data +- uploaded files +- application logs +""" + +[config.env] +MYSQL_ROOT_PASSWORD = "${mysql_root_password}" +MYSQL_DATABASE = "ospos" +MYSQL_USER = "admin" +MYSQL_PASSWORD = "${mysql_password}" +PHP_TIMEZONE = "${php_timezone}" +FORCE_HTTPS = "${force_https}" +ALLOWED_HOSTNAMES = "${allowed_hostnames}" diff --git a/meta.json b/meta.json index 8be7825d7..59e2018bb 100644 --- a/meta.json +++ b/meta.json @@ -4761,6 +4761,25 @@ "nginx" ] }, + { + "id": "opensourcepos", + "name": "OpenSourcePOS", + "version": "master", + "description": "OpenSourcePOS is a web-based point of sale system for managing sales, inventory, customers, and reports.", + "logo": "opensourcepos.svg", + "links": { + "github": "https://github.com/opensourcepos/opensourcepos", + "website": "https://opensourcepos.org/", + "docs": "https://github.com/opensourcepos/opensourcepos/blob/master/README.md" + }, + "tags": [ + "pos", + "retail", + "inventory", + "sales", + "business" + ] + }, { "id": "openspeedtest", "name": "OpenSpeedTest",