feat: update Dockerfile and workflow for environment variable support
- Modified the Dockerfile to include ARG and ENV for PUBLIC_CONVEX_URL and PUBLIC_CONVEX_SITE_URL, enhancing configuration flexibility. - Updated the deploy workflow to pass these environment variables during the build process. - Adjusted package.json to use bun for script commands and added svelte-adapter-bun for improved Svelte integration.
This commit is contained in:
@@ -6,13 +6,9 @@ WORKDIR /app
|
||||
|
||||
# ---
|
||||
FROM base AS prepare
|
||||
# Replace <your-major-version> with the major version installed in your repository. For example:
|
||||
# RUN yarn global add turbo@^2
|
||||
|
||||
RUN bun add -g turbo@^2
|
||||
COPY . .
|
||||
# Add lockfile and package.json's of isolated subworkspace
|
||||
# Generate a partial monorepo with a pruned lockfile for a target workspace.
|
||||
# Assuming "web" is the name entered in the project's package.json: { name: "web" }
|
||||
RUN turbo prune web --docker
|
||||
|
||||
|
||||
@@ -28,6 +24,12 @@ COPY --from=prepare /app/out/full/ .
|
||||
# Copy the rest of the source code
|
||||
COPY --from=prepare /app/out/full/ .
|
||||
|
||||
ARG PUBLIC_CONVEX_URL
|
||||
ENV PUBLIC_CONVEX_URL=$PUBLIC_CONVEX_URL
|
||||
|
||||
ARG PUBLIC_CONVEX_SITE_URL
|
||||
ENV PUBLIC_CONVEX_SITE_URL=$PUBLIC_CONVEX_SITE_URL
|
||||
|
||||
RUN bunx turbo build
|
||||
|
||||
# Production stage
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
"version": "0.0.1",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite dev",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"dev": "bunx --bun vite dev",
|
||||
"build": "bunx --bun vite build",
|
||||
"preview": "bunx --bun vite preview",
|
||||
"prepare": "svelte-kit sync || echo ''",
|
||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
|
||||
@@ -22,6 +22,7 @@
|
||||
"esbuild": "^0.25.11",
|
||||
"postcss": "^8.5.6",
|
||||
"svelte": "^5.38.1",
|
||||
"svelte-adapter-bun": "^1.0.1",
|
||||
"svelte-check": "^4.3.1",
|
||||
"svelte-dnd-action": "^0.9.67",
|
||||
"tailwindcss": "^4.1.12",
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import adapter from "@sveltejs/adapter-auto";
|
||||
import adapter from "svelte-adapter-bun";
|
||||
import { vitePreprocess } from "@sveltejs/vite-plugin-svelte";
|
||||
|
||||
/** @type {import('@sveltejs/kit').Config} */
|
||||
|
||||
Reference in New Issue
Block a user