mirror of
https://github.com/stackblitz/bolt.new
synced 2025-06-26 18:17:50 +00:00
commit
d6525af305
7
.dockerignore
Normal file
7
.dockerignore
Normal file
@ -0,0 +1,7 @@
|
||||
node_modules
|
||||
.git
|
||||
.gitignore
|
||||
Dockerfile
|
||||
docker-compose.yml
|
||||
.env
|
||||
.env.local
|
||||
30
Dockerfile
Normal file
30
Dockerfile
Normal file
@ -0,0 +1,30 @@
|
||||
FROM node:20.15.1
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# Install pnpm (matches packageManager in package.json)
|
||||
RUN npm install -g pnpm@9.4.0
|
||||
|
||||
# Copy package files first
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
|
||||
# Clean install dependencies with legacy peer deps
|
||||
RUN rm -rf node_modules
|
||||
RUN pnpm install --no-frozen-lockfile
|
||||
RUN pnpm rebuild
|
||||
|
||||
# Copy source code
|
||||
COPY . .
|
||||
|
||||
# Create empty .env.local if it doesn't exist
|
||||
RUN touch .env.local
|
||||
|
||||
# Expose Vite's default port
|
||||
EXPOSE 5173
|
||||
|
||||
# Required for WebContainer API
|
||||
ENV NODE_ENV=development
|
||||
ENV VITE_LOG_LEVEL=debug
|
||||
|
||||
# Start Vite directly instead of through Remix
|
||||
CMD ["pnpm", "exec", "vite", "dev", "--host"]
|
||||
28
docker-compose.yml
Normal file
28
docker-compose.yml
Normal file
@ -0,0 +1,28 @@
|
||||
services:
|
||||
bolt:
|
||||
container_name: bolt
|
||||
image: bolt-new
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
ports:
|
||||
- "5173:5173"
|
||||
volumes:
|
||||
- .:/app
|
||||
- /app/node_modules
|
||||
environment:
|
||||
- NODE_ENV=development
|
||||
- VITE_LOG_LEVEL=debug
|
||||
env_file:
|
||||
- .env.local
|
||||
cap_add:
|
||||
- SYS_ADMIN
|
||||
security_opt:
|
||||
- seccomp=unconfined
|
||||
command: pnpm exec vite dev --host
|
||||
networks:
|
||||
- boltnew
|
||||
|
||||
networks:
|
||||
boltnew:
|
||||
name: boltnew
|
||||
@ -10,6 +10,11 @@ export default defineConfig((config) => {
|
||||
build: {
|
||||
target: 'esnext',
|
||||
},
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
strictPort: true,
|
||||
port: 5173,
|
||||
},
|
||||
plugins: [
|
||||
nodePolyfills({
|
||||
include: ['path', 'buffer'],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user