made some changes to make the docker compose build work + added docker ignores to not copy non-essential files
Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
*.log
|
||||
*.env
|
||||
.DS_Store
|
||||
.vscode/
|
||||
.idea/
|
||||
.next/
|
||||
@@ -2,10 +2,16 @@ FROM oven/bun:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
# Copy root manifest files and workspace packages needed for bun workspaces
|
||||
COPY package.json ./
|
||||
COPY apps ./apps
|
||||
COPY packages ./packages
|
||||
|
||||
RUN bun install --frozen-lockfile
|
||||
# Install workspace dependencies from repo root
|
||||
RUN bun install
|
||||
|
||||
# Build the client
|
||||
WORKDIR /app/apps/client
|
||||
RUN bun run build
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
"babel-plugin-react-compiler": "1.0.0",
|
||||
"tailwindcss": "^4",
|
||||
"typescript": "^5",
|
||||
"@turborepo-starter-project/server": "*"
|
||||
"@turborepo-starter-project/server": "workspace:*"
|
||||
},
|
||||
"ignoreScripts": [
|
||||
"sharp",
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
node_modules/
|
||||
dist/
|
||||
build/
|
||||
coverage/
|
||||
*.log
|
||||
*.env
|
||||
.DS_Store
|
||||
.vscode/
|
||||
.idea/
|
||||
@@ -2,9 +2,16 @@ FROM oven/bun:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY . .
|
||||
# Copy root manifest files and workspace packages so bun can resolve workspaces
|
||||
COPY package.json ./
|
||||
COPY apps ./apps
|
||||
COPY packages ./packages
|
||||
|
||||
RUN bun install --frozen-lockfile
|
||||
# Install workspace dependencies from repo root
|
||||
RUN bun install
|
||||
|
||||
# Run server from its app folder
|
||||
WORKDIR /app/apps/server
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
|
||||
@@ -15,4 +15,4 @@ export const DELETE = app.delete;
|
||||
|
||||
console.log(
|
||||
`🦊 Elysia is running at ${app.server?.hostname}:${app.server?.port}`
|
||||
);
|
||||
);
|
||||
@@ -39,7 +39,7 @@
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "2.2.0",
|
||||
"@tailwindcss/postcss": "^4",
|
||||
"@turborepo-starter-project/server": "*",
|
||||
"@turborepo-starter-project/server": "workspace:*",
|
||||
"@types/node": "^20",
|
||||
"@types/react": "^19",
|
||||
"@types/react-dom": "^19",
|
||||
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
services:
|
||||
client:
|
||||
build:
|
||||
context: ./apps/client
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
dockerfile: apps/client/Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 3000:3000
|
||||
@@ -12,8 +12,8 @@ services:
|
||||
- server
|
||||
server:
|
||||
build:
|
||||
context: ./apps/server
|
||||
dockerfile: Dockerfile
|
||||
context: .
|
||||
dockerfile: apps/server/Dockerfile
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
- 3000
|
||||
|
||||
Reference in New Issue
Block a user