@powerhousedao/switchboard 6.0.0-dev.121 → 6.0.0-dev.123
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/CHANGELOG.md +14 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/Dockerfile +0 -86
- package/entrypoint.sh +0 -17
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powerhousedao/switchboard",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "6.0.0-dev.
|
|
4
|
+
"version": "6.0.0-dev.123",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"kysely-pglite-dialect": "1.2.0",
|
|
48
48
|
"pg": "8.18.0",
|
|
49
49
|
"redis": "^4.7.0",
|
|
50
|
-
"@powerhousedao/
|
|
51
|
-
"@powerhousedao/
|
|
52
|
-
"@powerhousedao/
|
|
53
|
-
"@powerhousedao/
|
|
54
|
-
"@powerhousedao/vetra": "6.0.0-dev.
|
|
55
|
-
"@powerhousedao/
|
|
56
|
-
"@renown/sdk": "6.0.0-dev.
|
|
57
|
-
"document-model": "6.0.0-dev.
|
|
50
|
+
"@powerhousedao/reactor": "6.0.0-dev.123",
|
|
51
|
+
"@powerhousedao/config": "6.0.0-dev.123",
|
|
52
|
+
"@powerhousedao/opentelemetry-instrumentation-reactor": "6.0.0-dev.123",
|
|
53
|
+
"@powerhousedao/shared": "6.0.0-dev.123",
|
|
54
|
+
"@powerhousedao/vetra": "6.0.0-dev.123",
|
|
55
|
+
"@powerhousedao/reactor-api": "6.0.0-dev.123",
|
|
56
|
+
"@renown/sdk": "6.0.0-dev.123",
|
|
57
|
+
"document-model": "6.0.0-dev.123"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/express": "^4.17.25",
|
package/Dockerfile
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
# Build stage
|
|
2
|
-
FROM node:24-alpine AS build
|
|
3
|
-
|
|
4
|
-
WORKDIR /app
|
|
5
|
-
|
|
6
|
-
# Install build dependencies
|
|
7
|
-
RUN apk add --no-cache python3 make g++ git bash \
|
|
8
|
-
&& ln -sf /usr/bin/python3 /usr/bin/python
|
|
9
|
-
|
|
10
|
-
# Setup pnpm
|
|
11
|
-
ENV PNPM_HOME="/pnpm"
|
|
12
|
-
ENV PATH="$PNPM_HOME:$PATH"
|
|
13
|
-
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
14
|
-
|
|
15
|
-
# Configure JSR registry
|
|
16
|
-
RUN pnpm config set @jsr:registry https://npm.jsr.io
|
|
17
|
-
|
|
18
|
-
# Build arguments
|
|
19
|
-
ARG TAG=latest
|
|
20
|
-
ARG PH_PACKAGES=""
|
|
21
|
-
|
|
22
|
-
# Install ph-cmd, prisma, and prettier
|
|
23
|
-
RUN pnpm add -g ph-cmd@$TAG prisma@5.17.0 prettier
|
|
24
|
-
|
|
25
|
-
# Initialize project based on tag
|
|
26
|
-
RUN case "$TAG" in \
|
|
27
|
-
*dev*) ph init project --dev --package-manager pnpm ;; \
|
|
28
|
-
*staging*) ph init project --staging --package-manager pnpm ;; \
|
|
29
|
-
*) ph init project --package-manager pnpm ;; \
|
|
30
|
-
esac
|
|
31
|
-
|
|
32
|
-
WORKDIR /app/project
|
|
33
|
-
|
|
34
|
-
# Install PH packages if provided
|
|
35
|
-
RUN if [ -n "$PH_PACKAGES" ]; then \
|
|
36
|
-
IFS=',' ; for pkg in $PH_PACKAGES; do \
|
|
37
|
-
echo "Installing package: $pkg"; \
|
|
38
|
-
ph install "$pkg"; \
|
|
39
|
-
done; \
|
|
40
|
-
fi
|
|
41
|
-
|
|
42
|
-
# Regenerate Prisma client for Alpine Linux (linux-musl-openssl-3.0.x)
|
|
43
|
-
# The document-drive package ships with darwin-arm64 binaries, we need to regenerate
|
|
44
|
-
RUN prisma generate --schema node_modules/document-drive/dist/prisma/schema.prisma
|
|
45
|
-
|
|
46
|
-
# Final stage - slim node image
|
|
47
|
-
FROM node:24-alpine
|
|
48
|
-
|
|
49
|
-
WORKDIR /app
|
|
50
|
-
|
|
51
|
-
# Install runtime dependencies (curl for health checks, openssl for Prisma)
|
|
52
|
-
RUN apk add --no-cache curl openssl
|
|
53
|
-
|
|
54
|
-
# Setup pnpm
|
|
55
|
-
ENV PNPM_HOME="/pnpm"
|
|
56
|
-
ENV PATH="$PNPM_HOME:$PATH"
|
|
57
|
-
RUN corepack enable && corepack prepare pnpm@latest --activate
|
|
58
|
-
|
|
59
|
-
# Configure JSR registry
|
|
60
|
-
RUN pnpm config set @jsr:registry https://npm.jsr.io
|
|
61
|
-
|
|
62
|
-
# Install ph-cmd and prisma globally (needed at runtime)
|
|
63
|
-
ARG TAG=latest
|
|
64
|
-
RUN pnpm add -g ph-cmd@$TAG prisma@5.17.0
|
|
65
|
-
|
|
66
|
-
# Copy built project from build stage
|
|
67
|
-
COPY --from=build /app/project /app/project
|
|
68
|
-
|
|
69
|
-
WORKDIR /app/project
|
|
70
|
-
|
|
71
|
-
# Copy entrypoint
|
|
72
|
-
COPY entrypoint.sh /app/entrypoint.sh
|
|
73
|
-
RUN chmod +x /app/entrypoint.sh
|
|
74
|
-
|
|
75
|
-
# Environment variables
|
|
76
|
-
ENV NODE_ENV=production
|
|
77
|
-
ENV PORT=3000
|
|
78
|
-
ENV DATABASE_URL=""
|
|
79
|
-
ENV SKIP_DB_MIGRATIONS="false"
|
|
80
|
-
|
|
81
|
-
EXPOSE ${PORT}
|
|
82
|
-
|
|
83
|
-
HEALTHCHECK --interval=30s --timeout=3s --start-period=30s --retries=3 \
|
|
84
|
-
CMD curl -f http://localhost:${PORT}/health || exit 1
|
|
85
|
-
|
|
86
|
-
ENTRYPOINT ["/app/entrypoint.sh"]
|
package/entrypoint.sh
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
#!/bin/sh
|
|
2
|
-
set -e
|
|
3
|
-
|
|
4
|
-
# Regenerate Prisma client for current platform (fixes darwin-arm64 vs linux-musl-openssl mismatch)
|
|
5
|
-
echo "[entrypoint] Regenerating Prisma client for current platform..."
|
|
6
|
-
prisma generate --schema node_modules/document-drive/dist/prisma/schema.prisma
|
|
7
|
-
|
|
8
|
-
# Run migrations if DATABASE_URL is postgres and migrations not skipped
|
|
9
|
-
if [ -n "$DATABASE_URL" ] && echo "$DATABASE_URL" | grep -q "^postgres" && [ "$SKIP_DB_MIGRATIONS" != "true" ]; then
|
|
10
|
-
echo "[entrypoint] Running Prisma db push..."
|
|
11
|
-
prisma db push --schema node_modules/document-drive/dist/prisma/schema.prisma --skip-generate
|
|
12
|
-
echo "[entrypoint] Running migrations..."
|
|
13
|
-
ph switchboard --migrate
|
|
14
|
-
fi
|
|
15
|
-
|
|
16
|
-
echo "[entrypoint] Starting switchboard on port ${PORT:-3000}..."
|
|
17
|
-
exec ph switchboard --port ${PORT:-3000}
|