mirror of
https://github.com/usememos/memos.git
synced 2024-12-26 23:22:47 +08:00
chore: docker compose dev (#2458)
* add golang build cache volume to speedup build * replace `lint` with `npm` to run more scripts * wrap golangci-lint as entrypoint instead of command
This commit is contained in:
parent
e41ea445c9
commit
76d955a69a
1 changed files with 8 additions and 4 deletions
|
@ -12,6 +12,7 @@ services:
|
||||||
- "MEMOS_DRIVER=mysql"
|
- "MEMOS_DRIVER=mysql"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/work/
|
- .:/work/
|
||||||
|
- .air/go-build:/root/.cache/go-build
|
||||||
- $HOME/go/pkg/:/go/pkg/ # Cache for go mod shared with the host
|
- $HOME/go/pkg/:/go/pkg/ # Cache for go mod shared with the host
|
||||||
web:
|
web:
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
|
@ -50,17 +51,20 @@ services:
|
||||||
profiles: ["tools"]
|
profiles: ["tools"]
|
||||||
image: golangci/golangci-lint:v1.54.2
|
image: golangci/golangci-lint:v1.54.2
|
||||||
working_dir: /work/
|
working_dir: /work/
|
||||||
command: golangci-lint run -v
|
entrypoint: golangci-lint
|
||||||
|
command: run -v
|
||||||
volumes:
|
volumes:
|
||||||
- $HOME/go/pkg/:/go/pkg/ # Cache for go mod shared with the host
|
- $HOME/go/pkg/:/go/pkg/ # Cache for go mod shared with the host
|
||||||
|
- .air/go-build:/root/.cache/go-build
|
||||||
- .:/work/
|
- .:/work/
|
||||||
|
|
||||||
# Do javascript lint before create PR
|
# run npm
|
||||||
lint:
|
npm:
|
||||||
profiles: ["tools"]
|
profiles: ["tools"]
|
||||||
image: node:18-alpine
|
image: node:18-alpine
|
||||||
working_dir: /work
|
working_dir: /work
|
||||||
command: npm --no-update-notifier run lint
|
environment: ["NPM_CONFIG_UPDATE_NOTIFIER=false"]
|
||||||
|
entrypoint: "npm"
|
||||||
volumes:
|
volumes:
|
||||||
- ./web:/work
|
- ./web:/work
|
||||||
- ./.air/node_modules/:/work/node_modules/
|
- ./.air/node_modules/:/work/node_modules/
|
||||||
|
|
Loading…
Reference in a new issue