You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Makefile
+29-4Lines changed: 29 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,20 @@
1
-
# LogLama Makefile
1
+
# WebTask Makefile
2
+
3
+
# Load environment variables from .env file
4
+
ifneq (,$(wildcard ./.env))
5
+
include .env
6
+
export$(shellsed's/=.*//'.env)
7
+
endif
2
8
3
9
# Default values that can be overridden
4
-
PORT ?= 8081
5
-
HOST ?= 127.0.0.1
10
+
PORT ?= 9000
11
+
HOST ?= 0.0.0.0
6
12
PYTHON ?= python3
7
13
LOG_DIR ?= ./logs
8
14
DB_PATH ?= $(LOG_DIR)/loglama.db
9
15
EXAMPLE_DB_PATH ?= $(LOG_DIR)/example.db
10
16
11
-
.PHONY: all setup install test test-unit test-integration test-ansible lint format clean run-api web run-example view-logs run-integration run-examples build publish publish-test check-publish help
17
+
.PHONY: all setup install test test-unit test-integration test-ansible lint format clean run-api web run-example view-logs run-integration run-examples build publish publish-test check-publish help start stop restart status
12
18
13
19
all: help
14
20
@@ -87,6 +93,25 @@ publish-full:
87
93
@chmod +x scripts/publish.sh
88
94
@./scripts/publish.sh
89
95
96
+
# Start the WebTask server
97
+
start:
98
+
@echo "Starting WebTask server on $(HOST):$(PORT)..."
99
+
@poetry run webtask --host $(HOST) --port $(PORT)
100
+
101
+
# Stop the WebTask server
102
+
stop:
103
+
@echo "Stopping WebTask server on port $(PORT)..."
104
+
@-pkill -f "webtask --host $(HOST) --port $(PORT)"||echo"No WebTask server found running on port $(PORT)"
0 commit comments