binajmen
binajmen
Explore posts from servers
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
is there an impact I'm unaware of except the performance if switching to node?
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
mmh, i guess switching from bun to node should be as transparent as switching from node to bun.
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
Oh, are you implying bun is not yet supported? I was not aware of that!
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
I will certainly try to replicate this issue in a minimal reproduction project. However the fact that this is "self-healing" after n retries is.. troublesome.
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
compose.yml
name: cockpit

services:
web:
build:
context: .
dockerfile: Dockerfile
target: release
args:
BUILD_TAG: ${BUILD_TAG}
image: cockpit-web:${BUILD_TAG}
env_file:
- .env
ports:
- "3110:3000"
user: bun
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5435:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5

volumes:
postgres_data:
name: cockpit

services:
web:
build:
context: .
dockerfile: Dockerfile
target: release
args:
BUILD_TAG: ${BUILD_TAG}
image: cockpit-web:${BUILD_TAG}
env_file:
- .env
ports:
- "3110:3000"
user: bun
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:17
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
ports:
- "5435:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 10s
timeout: 5s
retries: 5

volumes:
postgres_data:
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
Dockerfile
# use the official Bun image
FROM oven/bun:1.2.0 AS base
ARG BUILD_TAG
WORKDIR /app

# install dependencies into temp directory
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lockb /temp/dev/
COPY patches/ /temp/dev/patches
RUN cd /temp/dev && bun install --frozen-lockfile

# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY package.json bun.lockb /temp/prod/
COPY patches/ /temp/prod/patches
RUN cd /temp/prod && bun install --frozen-lockfile --production

# copy node_modules from temp directory
# then copy all (non-ignored) project files into the image
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules node_modules
COPY . .

# build the application
ENV NODE_ENV=production
RUN bun run build
RUN chmod +x /app/docker-entrypoint.sh

# copy production dependencies and source code into final image
FROM base AS release
COPY --from=install /temp/dev/node_modules node_modules
COPY --from=prerelease /app/.output .output
COPY --from=prerelease /app/package.json .
COPY --from=prerelease /app/docker-entrypoint.sh .

# this files are necessary to perform the drizzle migration
COPY --from=prerelease /app/drizzle.config.ts .
COPY --from=prerelease /app/drizzle drizzle/

LABEL build_tag=$BUILD_TAG

USER bun

ENTRYPOINT ["./docker-entrypoint.sh"]
# use the official Bun image
FROM oven/bun:1.2.0 AS base
ARG BUILD_TAG
WORKDIR /app

# install dependencies into temp directory
FROM base AS install
RUN mkdir -p /temp/dev
COPY package.json bun.lockb /temp/dev/
COPY patches/ /temp/dev/patches
RUN cd /temp/dev && bun install --frozen-lockfile

# install with --production (exclude devDependencies)
RUN mkdir -p /temp/prod
COPY package.json bun.lockb /temp/prod/
COPY patches/ /temp/prod/patches
RUN cd /temp/prod && bun install --frozen-lockfile --production

# copy node_modules from temp directory
# then copy all (non-ignored) project files into the image
FROM base AS prerelease
COPY --from=install /temp/dev/node_modules node_modules
COPY . .

# build the application
ENV NODE_ENV=production
RUN bun run build
RUN chmod +x /app/docker-entrypoint.sh

# copy production dependencies and source code into final image
FROM base AS release
COPY --from=install /temp/dev/node_modules node_modules
COPY --from=prerelease /app/.output .output
COPY --from=prerelease /app/package.json .
COPY --from=prerelease /app/docker-entrypoint.sh .

# this files are necessary to perform the drizzle migration
COPY --from=prerelease /app/drizzle.config.ts .
COPY --from=prerelease /app/drizzle drizzle/

LABEL build_tag=$BUILD_TAG

USER bun

ENTRYPOINT ["./docker-entrypoint.sh"]
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
app.config.ts
import { defineConfig } from "@solidjs/start/config";
import devtools from "solid-devtools/vite";
import Icons from "unplugin-icons/vite";

export default defineConfig({
ssr: false,
middleware: "./src/middlewares/index.ts",
server: {
compatibilityDate: "2025-01-28",
logLevel: 4,
},
vite: {
ssr: {
noExternal: ["@atlaskit/pragmatic-drag-and-drop"],
},
plugins: [devtools({ autoname: true }), Icons({ compiler: "solid" })],
},
});
import { defineConfig } from "@solidjs/start/config";
import devtools from "solid-devtools/vite";
import Icons from "unplugin-icons/vite";

export default defineConfig({
ssr: false,
middleware: "./src/middlewares/index.ts",
server: {
compatibilityDate: "2025-01-28",
logLevel: 4,
},
vite: {
ssr: {
noExternal: ["@atlaskit/pragmatic-drag-and-drop"],
},
plugins: [devtools({ autoname: true }), Icons({ compiler: "solid" })],
},
});
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
package.json
{
"name": "cockpit",
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"version": "vinxi version"
},
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
"@kobalte/core": "^0.13.7",
"@solid-primitives/map": "^0.5.0",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.2",
"@solidjs/start": "^1.0.10",
"@tanstack/solid-query": "^5.62.12",
"@tanstack/solid-table": "^8.20.5",
"clsx": "^2.1.1",
"dotenv": "^16.4.7",
"drizzle-orm": "^0.38.3",
"dropbox": "^10.34.0",
"marked": "^15.0.5",
"pg": "^8.13.1",
"solid-js": "^1.9.3",
"tailwind-merge": "^2.6.0",
"tiny-invariant": "^1.3.3",
"vinxi": "0.4.3",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
"zod": "^3.24.1"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@iconify-json/lucide": "^1.2.21",
"@tailwindcss/forms": "^0.5.9",
"@types/bun": "^1.1.14",
"@types/pg": "^8.11.10",
"autoprefixer": "^10.4.20",
"drizzle-kit": "^0.30.1",
"postcss": "^8.4.49",
"solid-devtools": "^0.33.0",
"tailwindcss": "^3.4.17",
"unplugin-icons": "^0.22.0",
"vitest": "^2.1.8"
},
"patchedDependencies": {
}
}
{
"name": "cockpit",
"type": "module",
"scripts": {
"dev": "vinxi dev",
"build": "vinxi build",
"start": "vinxi start",
"version": "vinxi version"
},
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.4.0",
"@kobalte/core": "^0.13.7",
"@solid-primitives/map": "^0.5.0",
"@solidjs/meta": "^0.29.4",
"@solidjs/router": "^0.15.2",
"@solidjs/start": "^1.0.10",
"@tanstack/solid-query": "^5.62.12",
"@tanstack/solid-table": "^8.20.5",
"clsx": "^2.1.1",
"dotenv": "^16.4.7",
"drizzle-orm": "^0.38.3",
"dropbox": "^10.34.0",
"marked": "^15.0.5",
"pg": "^8.13.1",
"solid-js": "^1.9.3",
"tailwind-merge": "^2.6.0",
"tiny-invariant": "^1.3.3",
"vinxi": "0.4.3",
"xlsx": "https://cdn.sheetjs.com/xlsx-0.20.3/xlsx-0.20.3.tgz",
"zod": "^3.24.1"
},
"engines": {
"node": ">=18"
},
"devDependencies": {
"@biomejs/biome": "1.9.4",
"@iconify-json/lucide": "^1.2.21",
"@tailwindcss/forms": "^0.5.9",
"@types/bun": "^1.1.14",
"@types/pg": "^8.11.10",
"autoprefixer": "^10.4.20",
"drizzle-kit": "^0.30.1",
"postcss": "^8.4.49",
"solid-devtools": "^0.33.0",
"tailwindcss": "^3.4.17",
"unplugin-icons": "^0.22.0",
"vitest": "^2.1.8"
},
"patchedDependencies": {
}
}
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
@lominming I'm as well sorry for the direct ping, but did you find out a way to resolve your issue?
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
This other issue also describe my second point: https://github.com/nksaraf/vinxi/issues/326
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
@jayson.kt I'm sorry for the direct ping, but as the author of the issue, did you find any additional explanations that could help me in my current situation?
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
But I'm unsure is this is related or not.
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
The closest issue related to bundling issue is: https://github.com/solidjs/solid-start/issues/1570
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
Any ideas how I can try to figure out what is happening?
21 replies
SSolidJS
Created by binajmen on 3/18/2025 in #support
Spooky behaviour while deploying in production
I would love to share a reproduction but this is a private project so I cannot share it publicly. However I can add some individuals from the core team if this is a legit concern.
21 replies
SSolidJS
Created by binajmen on 2/22/2025 in #support
[valibot] Types generic
😂
20 replies
SSolidJS
Created by binajmen on 2/22/2025 in #support
[valibot] Types generic
works fine ty !
20 replies
SSolidJS
Created by binajmen on 2/22/2025 in #support
[valibot] Types generic
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
async function get<Schema extends v.BaseSchema<any, any, any>>(
path: string,
schema: Schema,
): Promise<v.InferOutput<Schema>> {
return fetch(`${API_URL}${path}`)
.then((res) => res.json())
.then((json) => v.parse(schema, json));
}
// biome-ignore lint/suspicious/noExplicitAny: <explanation>
async function get<Schema extends v.BaseSchema<any, any, any>>(
path: string,
schema: Schema,
): Promise<v.InferOutput<Schema>> {
return fetch(`${API_URL}${path}`)
.then((res) => res.json())
.then((json) => v.parse(schema, json));
}
20 replies
SSolidJS
Created by binajmen on 2/22/2025 in #support
[valibot] Types generic
ok 😄
20 replies
SSolidJS
Created by binajmen on 2/22/2025 in #support
[valibot] Types generic
linter
20 replies