Skip to content

Commit

Permalink
Merge pull request #134 from OurFreeLight/dev
Browse files Browse the repository at this point in the history
0.8.101 merge
  • Loading branch information
ncoonrod authored Jan 14, 2025
2 parents f5dec35 + ea6dc49 commit 8d5d636
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion builder/docker/docker-compose.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ services:
networks:
- ${HOTSITE_NAME}-network
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "127.0.0.1"]
test: ["CMD", "mariadb-admin" ,"ping", "-h", "127.0.0.1"]
retries: 10
timeout: 10s
volumes:
Expand Down
4 changes: 2 additions & 2 deletions builder/helm-chart/templates/database-statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
livenessProbe:
exec:
command:
- mysqladmin
- mariadb-admin
- ping
- -h
- localhost
Expand All @@ -53,7 +53,7 @@ spec:
readinessProbe:
exec:
command:
- mysqladmin
- mariadb-admin
- ping
- -h
- localhost
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hotstaq",
"version": "0.8.100",
"version": "0.8.101",
"description": "A friendly web framework that fits nicely into devops and CI/CD pipelines.",
"bin": {
"hotstaq": "./bin/hotstaq"
Expand Down
10 changes: 9 additions & 1 deletion src/HotCLI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { HotRoute } from "./HotRoute";
import { HotRouteMethod } from "./HotRouteMethod";
import { HotServerType } from "./HotServer";
import { HotDeployer } from "./HotDeployer";
import { HotDBType } from "./HotDB";

HotStaq.isWeb = false;

Expand Down Expand Up @@ -202,7 +203,7 @@ export class HotCLI
{
let dbClass = null;

if (dbinfo.type === "mysql")
if ((dbinfo.type === "mysql") || (dbinfo.type === "mariadb"))
dbClass = HotDBMySQL;

if (dbinfo.type === "influx")
Expand All @@ -211,7 +212,14 @@ export class HotCLI
if (dbinfo.type === "postgres")
dbClass = HotDBPostgres;

if (dbClass == null)
throw new Error (`Unable to use database type ${dbinfo.type}, no class available.`);

api.db = new dbClass ();

if (dbinfo.type === "mariadb")
api.db.type = HotDBType.MariaDB;

await server.setAPI (api);

if (dbinfo.username === "")
Expand Down
2 changes: 1 addition & 1 deletion src/HotStaq.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ export class HotStaq implements IHotStaq
/**
* The current version of HotStaq.
*/
static version: string = "0.8.100";
static version: string = "0.8.101";
/**
* Indicates if this is a web build.
*/
Expand Down

0 comments on commit 8d5d636

Please sign in to comment.