Skip to content

Commit 8a95f59

Browse files
committed
Enhance Dockerfile: Install pnpm globally and update build commands for both frontend and backend
1 parent 35d2023 commit 8a95f59

1 file changed

Lines changed: 13 additions & 3 deletions

File tree

Dockerfile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ FROM golang:1.25-alpine AS builder
2323
# Install build dependencies including Node.js and npm
2424
RUN apk add --no-cache git make bash sqlite openssl zip nodejs npm
2525

26+
# Install pnpm globally
27+
RUN npm install -g pnpm
28+
29+
# Set environment variables for CI build
30+
ENV CI=true
31+
2632
# Set the working directory
2733
WORKDIR /app
2834

@@ -53,12 +59,12 @@ RUN if [ -n "$CERT_FILE" ] && [ -n "$KEY_FILE" ] && [ -f "$CERT_FILE" ] && [ -f
5359
echo "✅ New certificates generated"; \
5460
fi
5561

56-
# Build the binary for the target architecture
62+
# Build both frontend and backend for the target architecture
5763
ARG TARGETARCH
5864
RUN if [ "$TARGETARCH" = "amd64" ]; then \
59-
./build.sh build_backend linux amd64; \
65+
./build.sh build linux amd64; \
6066
else \
61-
./build.sh build_backend linux arm64; \
67+
./build.sh build linux arm64; \
6268
fi
6369

6470
# List the contents of the dist directory to verify zip output
@@ -104,11 +110,15 @@ RUN chown -R thunder:thunder /opt/thunder && \
104110
# Expose the default port
105111
EXPOSE 8090
106112

113+
# Expose the Gate port
114+
EXPOSE 9090
115+
107116
# Switch to thunder user
108117
USER thunder
109118

110119
# Set environment variables
111120
ENV BACKEND_PORT=8090
121+
ENV FRONTEND_PORT=9090
112122

113123
# Start the application
114124
CMD ["./start.sh"]

0 commit comments

Comments
 (0)