Skip to content

Commit cc281ec

Browse files
committed
feat: add OpenSourcePOS template
1 parent 1cde3fa commit cc281ec

4 files changed

Lines changed: 124 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
version: "3.8"
2+
3+
services:
4+
opensourcepos:
5+
image: jekkos/opensourcepos:master
6+
restart: unless-stopped
7+
depends_on:
8+
opensourcepos-db:
9+
condition: service_healthy
10+
expose:
11+
- "80"
12+
environment:
13+
CI_ENVIRONMENT: production
14+
ALLOWED_HOSTNAMES: ${ALLOWED_HOSTNAMES}
15+
FORCE_HTTPS: ${FORCE_HTTPS}
16+
PHP_TIMEZONE: ${PHP_TIMEZONE}
17+
MYSQL_USERNAME: ${MYSQL_USER}
18+
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
19+
MYSQL_DB_NAME: ${MYSQL_DATABASE}
20+
MYSQL_HOST_NAME: opensourcepos-db
21+
volumes:
22+
- opensourcepos-uploads:/app/public/uploads
23+
- opensourcepos-logs:/app/writable/logs
24+
25+
opensourcepos-db:
26+
image: mariadb:10.11
27+
restart: unless-stopped
28+
environment:
29+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
30+
MYSQL_DATABASE: ${MYSQL_DATABASE}
31+
MYSQL_USER: ${MYSQL_USER}
32+
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
33+
volumes:
34+
- opensourcepos-db:/var/lib/mysql
35+
healthcheck:
36+
test: ["CMD-SHELL", "healthcheck.sh --connect --innodb_initialized"]
37+
interval: 10s
38+
timeout: 5s
39+
retries: 5
40+
start_period: 30s
41+
42+
volumes:
43+
opensourcepos-db:
44+
opensourcepos-uploads:
45+
opensourcepos-logs:
Lines changed: 9 additions & 0 deletions
Loading
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
[variables]
2+
main_domain = "${domain}"
3+
mysql_root_password = "${password:32}"
4+
mysql_password = "${password:32}"
5+
php_timezone = "UTC"
6+
force_https = "false"
7+
allowed_hostnames = "${main_domain}"
8+
9+
[[config.domains]]
10+
serviceName = "opensourcepos"
11+
port = 80
12+
host = "${main_domain}"
13+
path = "/"
14+
15+
[[config.mounts]]
16+
filePath = "README.md"
17+
content = """# OpenSourcePOS
18+
19+
This template deploys Open Source Point of Sale with MariaDB using the upstream Docker image and persistent storage for uploads, logs, and database data.
20+
21+
## Access
22+
23+
- URL: `http://${main_domain}`
24+
- Default application user: `admin`
25+
- Default application password: `pointofsale`
26+
27+
Change the default application password immediately after the first login.
28+
29+
## Hostnames and HTTPS
30+
31+
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`.
32+
33+
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.
34+
35+
## Storage
36+
37+
The template creates persistent volumes for:
38+
39+
- MariaDB data
40+
- uploaded files
41+
- application logs
42+
"""
43+
44+
[config.env]
45+
MYSQL_ROOT_PASSWORD = "${mysql_root_password}"
46+
MYSQL_DATABASE = "ospos"
47+
MYSQL_USER = "admin"
48+
MYSQL_PASSWORD = "${mysql_password}"
49+
PHP_TIMEZONE = "${php_timezone}"
50+
FORCE_HTTPS = "${force_https}"
51+
ALLOWED_HOSTNAMES = "${allowed_hostnames}"

meta.json

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4761,6 +4761,25 @@
47614761
"nginx"
47624762
]
47634763
},
4764+
{
4765+
"id": "opensourcepos",
4766+
"name": "OpenSourcePOS",
4767+
"version": "master",
4768+
"description": "OpenSourcePOS is a web-based point of sale system for managing sales, inventory, customers, and reports.",
4769+
"logo": "opensourcepos.svg",
4770+
"links": {
4771+
"github": "https://github.com/opensourcepos/opensourcepos",
4772+
"website": "https://opensourcepos.org/",
4773+
"docs": "https://github.com/opensourcepos/opensourcepos/blob/master/README.md"
4774+
},
4775+
"tags": [
4776+
"pos",
4777+
"retail",
4778+
"inventory",
4779+
"sales",
4780+
"business"
4781+
]
4782+
},
47644783
{
47654784
"id": "openspeedtest",
47664785
"name": "OpenSpeedTest",

0 commit comments

Comments
 (0)