mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
feat: add Docker configuration for development (#1)
This commit is contained in:
parent
0cd5a259ae
commit
b0fbbe40c1
4 changed files with 38 additions and 2 deletions
12
dev.Dockerfile
Normal file
12
dev.Dockerfile
Normal file
|
@ -0,0 +1,12 @@
|
|||
FROM node:18
|
||||
|
||||
WORKDIR /app
|
||||
COPY package.json yarn.lock ./
|
||||
RUN yarn
|
||||
|
||||
WORKDIR /app/excalidraw-app
|
||||
COPY excalidraw-app/package.json ./
|
||||
RUN yarn
|
||||
|
||||
WORKDIR /app
|
||||
COPY . /app
|
22
docker-compose.dev.yml
Normal file
22
docker-compose.dev.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
services:
|
||||
excalidraw:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: dev.Dockerfile
|
||||
command: yarn start:dev:docker
|
||||
develop:
|
||||
watch:
|
||||
- action: sync
|
||||
path: ./packages
|
||||
target: /app/packages
|
||||
ignore:
|
||||
- node_modules/
|
||||
- action: sync
|
||||
path: ./excalidraw-app
|
||||
target: /app/excalidraw-app
|
||||
ignore:
|
||||
- node_modules/
|
||||
- action: rebuild
|
||||
path: package.json
|
||||
ports:
|
||||
- 3000:3000
|
|
@ -47,10 +47,11 @@
|
|||
"build": "yarn build:app && yarn build:version",
|
||||
"start": "yarn && vite",
|
||||
"start:production": "yarn build && yarn serve",
|
||||
"start:dev:docker": "yarn && vite --no-open --host",
|
||||
"serve": "npx http-server build -a localhost -p 5001 -o",
|
||||
"build:preview": "yarn build && vite preview --port 5000"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite-plugin-sitemap": "0.7.1"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -58,6 +58,7 @@
|
|||
"start": "yarn --cwd ./excalidraw-app start",
|
||||
"start:production": "yarn --cwd ./excalidraw-app start:production",
|
||||
"start:example": "yarn build:package && yarn --cwd ./examples/with-script-in-browser start",
|
||||
"start:dev:docker": "yarn --cwd ./excalidraw-app start:dev:docker",
|
||||
"test:all": "yarn test:typecheck && yarn test:code && yarn test:other && yarn test:app --watch=false",
|
||||
"test:app": "vitest",
|
||||
"test:code": "eslint --max-warnings=0 --ext .js,.ts,.tsx .",
|
||||
|
@ -85,4 +86,4 @@
|
|||
"resolutions": {
|
||||
"strip-ansi": "6.0.1"
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue