@ezetgalaxy/titan 25.12.6 → 25.12.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ezetgalaxy/titan",
3
- "version": "25.12.6",
3
+ "version": "25.12.7",
4
4
  "description": "JavaScript backend framework that compiles your JS into a Rust + Axum server.",
5
5
  "license": "ISC",
6
6
  "author": "ezetgalaxy",
@@ -1,40 +1,59 @@
1
- # Stage 1 — Build Titan (JS → Rust)
1
+ # ================================================================
2
+ # STAGE 1 — Build Titan (JS → Rust)
3
+ # ================================================================
2
4
  FROM rust:1.91.1 AS builder
3
5
 
4
- # Install Node for Titan CLI
6
+ # Install Node for Titan CLI and bundler
5
7
  RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
6
8
  && apt-get install -y nodejs
7
9
 
8
- # Install Titan CLI AND its required dependencies
10
+ # Install Titan CLI globally
9
11
  RUN npm install -g @ezetgalaxy/titan
10
12
 
11
13
  WORKDIR /app
12
14
 
13
- # Copy project
15
+ # Copy project files into container
14
16
  COPY . .
15
17
 
16
- # Install Titan dependencies LOCALLY
18
+ # Install JS dependencies (for bundler & DSL)
17
19
  RUN npm install
18
20
 
19
- # Build Titan metadata (routes + bundles)
21
+ # Build Titan metadata (routes.json + actions/*.jsbundle)
20
22
  RUN tit build
21
23
 
22
- # Build Rust release binary
24
+ # Build the Rust backend (release mode)
23
25
  RUN cd server && cargo build --release
24
26
 
25
- # Stage 2 — Run Titan server
27
+
28
+
29
+ # ================================================================
30
+ # STAGE 2 — Runtime Image
31
+ # ================================================================
26
32
  FROM debian:stable-slim
27
33
 
28
34
  WORKDIR /app
29
35
 
30
- # Copy final Rust binary
36
+ # -------------------------------------------------------------
37
+ # Copy the Rust binary
38
+ # -------------------------------------------------------------
31
39
  COPY --from=builder /app/server/target/release/server ./titan-server
32
40
 
33
- # Copy Titan runtime files
34
- COPY --from=builder /app/server/routes.json .
35
- COPY --from=builder /app/server/action_map.json .
36
- COPY --from=builder /app/server/actions ./actions
41
+ # -------------------------------------------------------------
42
+ # Copy Titan routing metadata (REQUIRED)
43
+ # -------------------------------------------------------------
44
+ COPY --from=builder /app/server/routes.json ./routes.json
45
+ COPY --from=builder /app/server/action_map.json ./action_map.json
46
+
47
+ # -------------------------------------------------------------
48
+ # Copy Titan JS bundles directory (REQUIRED)
49
+ # -------------------------------------------------------------
50
+ RUN mkdir -p /app/actions
51
+ COPY --from=builder /app/server/actions /app/actions
52
+
37
53
 
54
+ # -------------------------------------------------------------
55
+ # Runtime configuration
56
+ # -------------------------------------------------------------
38
57
  EXPOSE 3000
39
58
 
40
59
  CMD ["./titan-server"]