@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 +1 -1
- package/templates/Dockerfile +32 -13
package/package.json
CHANGED
package/templates/Dockerfile
CHANGED
|
@@ -1,40 +1,59 @@
|
|
|
1
|
-
#
|
|
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
|
|
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
|
|
18
|
+
# Install JS dependencies (for bundler & DSL)
|
|
17
19
|
RUN npm install
|
|
18
20
|
|
|
19
|
-
# Build Titan metadata (routes +
|
|
21
|
+
# Build Titan metadata (routes.json + actions/*.jsbundle)
|
|
20
22
|
RUN tit build
|
|
21
23
|
|
|
22
|
-
# Build Rust release
|
|
24
|
+
# Build the Rust backend (release mode)
|
|
23
25
|
RUN cd server && cargo build --release
|
|
24
26
|
|
|
25
|
-
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
# ================================================================
|
|
30
|
+
# STAGE 2 — Runtime Image
|
|
31
|
+
# ================================================================
|
|
26
32
|
FROM debian:stable-slim
|
|
27
33
|
|
|
28
34
|
WORKDIR /app
|
|
29
35
|
|
|
30
|
-
#
|
|
36
|
+
# -------------------------------------------------------------
|
|
37
|
+
# Copy the Rust binary
|
|
38
|
+
# -------------------------------------------------------------
|
|
31
39
|
COPY --from=builder /app/server/target/release/server ./titan-server
|
|
32
40
|
|
|
33
|
-
#
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
COPY --from=builder /app/server/
|
|
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"]
|