@zintrust/core 0.1.43 → 0.1.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/package.json +3 -1
- package/packages/workers/src/http/middleware/FeaturesValidator.d.ts.map +1 -1
- package/packages/workers/src/http/middleware/FeaturesValidator.js +5 -4
- package/src/cli/CLI.d.ts.map +1 -1
- package/src/cli/CLI.js +8 -0
- package/src/cli/commands/ContainerComposeLifecycle.d.ts +20 -0
- package/src/cli/commands/ContainerComposeLifecycle.d.ts.map +1 -0
- package/src/cli/commands/ContainerComposeLifecycle.js +46 -0
- package/src/cli/commands/ContainerProxiesCommand.d.ts.map +1 -1
- package/src/cli/commands/ContainerProxiesCommand.js +7 -44
- package/src/cli/commands/ContainerWorkersCommand.d.ts.map +1 -1
- package/src/cli/commands/ContainerWorkersCommand.js +7 -30
- package/src/cli/commands/DeployCommand.d.ts.map +1 -1
- package/src/cli/commands/DeployCommand.js +12 -1
- package/src/cli/commands/DeployContainersProxyCommand.d.ts +5 -0
- package/src/cli/commands/DeployContainersProxyCommand.d.ts.map +1 -0
- package/src/cli/commands/DeployContainersProxyCommand.js +45 -0
- package/src/cli/commands/DockerCommand.d.ts +5 -0
- package/src/cli/commands/DockerCommand.d.ts.map +1 -0
- package/src/cli/commands/DockerCommand.js +156 -0
- package/src/cli/commands/DockerPushCommand.d.ts +5 -0
- package/src/cli/commands/DockerPushCommand.d.ts.map +1 -0
- package/src/cli/commands/DockerPushCommand.js +92 -0
- package/src/cli/commands/InitContainerCommand.d.ts.map +1 -1
- package/src/cli/commands/InitContainerCommand.js +1 -0
- package/src/cli/commands/InitContainersProxyCommand.d.ts +5 -0
- package/src/cli/commands/InitContainersProxyCommand.d.ts.map +1 -0
- package/src/cli/commands/InitContainersProxyCommand.js +159 -0
- package/src/cli/commands/PutCommand.d.ts.map +1 -1
- package/src/cli/commands/PutCommand.js +15 -5
- package/src/cli/commands/StartCommand.d.ts.map +1 -1
- package/src/cli/commands/StartCommand.js +20 -3
- package/src/config/queue.d.ts.map +1 -1
- package/src/config/queue.js +27 -8
- package/src/index.js +3 -3
- package/src/orm/Database.d.ts.map +1 -1
- package/src/orm/Database.js +36 -2
- package/src/performance/Optimizer.js +1 -1
- package/src/proxy/ProxyServer.d.ts.map +1 -1
- package/src/proxy/ProxyServer.js +9 -0
- package/src/session/SessionManager.js +1 -1
- package/src/templates/docker/docker-compose.schedules.yml.tpl +78 -7
|
@@ -2,6 +2,7 @@ name: zintrust-schedules
|
|
|
2
2
|
|
|
3
3
|
services:
|
|
4
4
|
schedules:
|
|
5
|
+
image: ${SCHEDULES_IMAGE:-zintrust/zintrust-schedules:latest}
|
|
5
6
|
build:
|
|
6
7
|
context: .
|
|
7
8
|
dockerfile: Dockerfile
|
|
@@ -21,13 +22,43 @@ services:
|
|
|
21
22
|
REDIS_DB: ${REDIS_DB:-0}
|
|
22
23
|
|
|
23
24
|
# Database (for job-tracking cleanup schedule)
|
|
25
|
+
# Supported: postgresql | mysql | sqlserver | sqlite | d1 | d1-remote
|
|
26
|
+
# Tip: to use mysql or sqlserver, start the corresponding profile:
|
|
27
|
+
# docker compose -f docker-compose.schedules.yml --profile mysql up -d
|
|
28
|
+
# docker compose -f docker-compose.schedules.yml --profile sqlserver up -d
|
|
24
29
|
DB_CONNECTION: ${DB_CONNECTION:-postgresql}
|
|
30
|
+
|
|
31
|
+
# PostgreSQL
|
|
25
32
|
DB_HOST: ${DB_HOST:-postgres}
|
|
26
|
-
|
|
33
|
+
DB_PORT_POSTGRESQL: ${DB_PORT_POSTGRESQL:-5432}
|
|
34
|
+
DB_DATABASE_POSTGRESQL: ${DB_DATABASE_POSTGRESQL:-zintrust}
|
|
35
|
+
DB_USERNAME_POSTGRESQL: ${DB_USERNAME_POSTGRESQL:-zintrust}
|
|
36
|
+
DB_PASSWORD_POSTGRESQL: ${DB_PASSWORD_POSTGRESQL:-zintrust}
|
|
37
|
+
|
|
38
|
+
# MySQL
|
|
39
|
+
DB_PORT: ${DB_PORT:-3306}
|
|
27
40
|
DB_DATABASE: ${DB_DATABASE:-zintrust}
|
|
28
41
|
DB_USERNAME: ${DB_USERNAME:-zintrust}
|
|
29
42
|
DB_PASSWORD: ${DB_PASSWORD:-zintrust}
|
|
30
43
|
|
|
44
|
+
# SQL Server
|
|
45
|
+
DB_HOST_MSSQL: ${DB_HOST_MSSQL:-sqlserver}
|
|
46
|
+
DB_PORT_MSSQL: ${DB_PORT_MSSQL:-1433}
|
|
47
|
+
DB_DATABASE_MSSQL: ${DB_DATABASE_MSSQL:-zintrust}
|
|
48
|
+
DB_USERNAME_MSSQL: ${DB_USERNAME_MSSQL:-sa}
|
|
49
|
+
DB_PASSWORD_MSSQL: ${DB_PASSWORD_MSSQL:-YourStrong!Passw0rd}
|
|
50
|
+
|
|
51
|
+
# SQLite (no DB container; writes to local filesystem inside the container)
|
|
52
|
+
DB_DATABASE_SQLITE: ${DB_DATABASE_SQLITE:-.zintrust/dbs/zintrust.sqlite}
|
|
53
|
+
|
|
54
|
+
# Cloudflare D1 (requires Cloudflare credentials / remote proxy)
|
|
55
|
+
D1_DATABASE_ID: ${D1_DATABASE_ID:-}
|
|
56
|
+
D1_ACCOUNT_ID: ${D1_ACCOUNT_ID:-}
|
|
57
|
+
D1_API_TOKEN: ${D1_API_TOKEN:-}
|
|
58
|
+
D1_REMOTE_URL: ${D1_REMOTE_URL:-}
|
|
59
|
+
D1_REMOTE_KEY_ID: ${D1_REMOTE_KEY_ID:-}
|
|
60
|
+
D1_REMOTE_SECRET: ${D1_REMOTE_SECRET:-}
|
|
61
|
+
|
|
31
62
|
# Job tracking cleanup schedule
|
|
32
63
|
JOB_TRACKING_CLEANUP_ENABLED: ${JOB_TRACKING_CLEANUP_ENABLED:-false}
|
|
33
64
|
JOB_TRACKING_CLEANUP_INTERVAL_MS: ${JOB_TRACKING_CLEANUP_INTERVAL_MS:-21600000}
|
|
@@ -37,8 +68,6 @@ services:
|
|
|
37
68
|
JOB_TRACKING_CLEANUP_LOCK_PROVIDER: ${JOB_TRACKING_CLEANUP_LOCK_PROVIDER:-redis}
|
|
38
69
|
command: ['node', 'dist/bin/zin.js', 'schedule:start']
|
|
39
70
|
depends_on:
|
|
40
|
-
postgres:
|
|
41
|
-
condition: service_healthy
|
|
42
71
|
redis:
|
|
43
72
|
condition: service_healthy
|
|
44
73
|
networks:
|
|
@@ -47,21 +76,61 @@ services:
|
|
|
47
76
|
postgres:
|
|
48
77
|
image: postgres:16-alpine
|
|
49
78
|
environment:
|
|
50
|
-
POSTGRES_DB: ${
|
|
51
|
-
POSTGRES_USER: ${
|
|
52
|
-
POSTGRES_PASSWORD: ${
|
|
79
|
+
POSTGRES_DB: ${DB_DATABASE_POSTGRESQL:-zintrust}
|
|
80
|
+
POSTGRES_USER: ${DB_USERNAME_POSTGRESQL:-zintrust}
|
|
81
|
+
POSTGRES_PASSWORD: ${DB_PASSWORD_POSTGRESQL:-zintrust}
|
|
53
82
|
ports:
|
|
54
83
|
- '${POSTGRES_PORT:-5432}:5432'
|
|
55
84
|
volumes:
|
|
56
85
|
- postgres_data:/var/lib/postgresql/data
|
|
57
86
|
healthcheck:
|
|
58
|
-
test: ['CMD-SHELL', 'pg_isready -U ${
|
|
87
|
+
test: ['CMD-SHELL', 'pg_isready -U ${DB_USERNAME_POSTGRESQL:-zintrust}']
|
|
59
88
|
interval: 10s
|
|
60
89
|
timeout: 5s
|
|
61
90
|
retries: 5
|
|
62
91
|
networks:
|
|
63
92
|
- zintrust-network
|
|
64
93
|
|
|
94
|
+
mysql:
|
|
95
|
+
profiles: ['mysql']
|
|
96
|
+
image: mysql:8.4
|
|
97
|
+
environment:
|
|
98
|
+
MYSQL_DATABASE: ${DB_DATABASE:-zintrust}
|
|
99
|
+
MYSQL_USER: ${DB_USERNAME:-zintrust}
|
|
100
|
+
MYSQL_PASSWORD: ${DB_PASSWORD:-zintrust}
|
|
101
|
+
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:-root}
|
|
102
|
+
ports:
|
|
103
|
+
- '${MYSQL_PORT:-3306}:3306'
|
|
104
|
+
volumes:
|
|
105
|
+
- mysql_data:/var/lib/mysql
|
|
106
|
+
healthcheck:
|
|
107
|
+
test: ['CMD-SHELL', 'mysqladmin ping -h 127.0.0.1 -uroot -p${MYSQL_ROOT_PASSWORD:-root} --silent']
|
|
108
|
+
interval: 10s
|
|
109
|
+
timeout: 5s
|
|
110
|
+
retries: 10
|
|
111
|
+
networks:
|
|
112
|
+
- zintrust-network
|
|
113
|
+
|
|
114
|
+
sqlserver:
|
|
115
|
+
profiles: ['sqlserver']
|
|
116
|
+
image: mcr.microsoft.com/mssql/server:2022-latest
|
|
117
|
+
environment:
|
|
118
|
+
ACCEPT_EULA: 'Y'
|
|
119
|
+
MSSQL_PID: ${MSSQL_PID:-Developer}
|
|
120
|
+
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD:-YourStrong!Passw0rd}
|
|
121
|
+
ports:
|
|
122
|
+
- '${SQLSERVER_PORT:-1433}:1433'
|
|
123
|
+
volumes:
|
|
124
|
+
- sqlserver_data:/var/opt/mssql
|
|
125
|
+
healthcheck:
|
|
126
|
+
test: ['CMD-SHELL', '/opt/mssql-tools18/bin/sqlcmd -S 127.0.0.1 -U sa -P "${MSSQL_SA_PASSWORD:-YourStrong!Passw0rd}" -Q "SELECT 1" 1>/dev/null']
|
|
127
|
+
interval: 10s
|
|
128
|
+
timeout: 10s
|
|
129
|
+
retries: 10
|
|
130
|
+
start_period: 20s
|
|
131
|
+
networks:
|
|
132
|
+
- zintrust-network
|
|
133
|
+
|
|
65
134
|
redis:
|
|
66
135
|
image: redis:7-alpine
|
|
67
136
|
ports:
|
|
@@ -82,3 +151,5 @@ networks:
|
|
|
82
151
|
volumes:
|
|
83
152
|
postgres_data:
|
|
84
153
|
redis_data:
|
|
154
|
+
mysql_data:
|
|
155
|
+
sqlserver_data:
|