mirror of
https://github.com/usememos/memos.git
synced 2025-06-05 22:09:59 +02:00
fix: docker-compose.dev.yaml (#2695)
* Fix docker-compose.dev.yaml * Add newline to .gitignore
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -16,6 +16,9 @@ build
|
|||||||
# Jetbrains
|
# Jetbrains
|
||||||
.idea
|
.idea
|
||||||
|
|
||||||
|
# Docker Compose Environment File
|
||||||
|
.env
|
||||||
|
|
||||||
bin/air
|
bin/air
|
||||||
|
|
||||||
dev-dist
|
dev-dist
|
||||||
|
@@ -1,8 +1,13 @@
|
|||||||
|
version: "3.0"
|
||||||
|
name: memos-dev
|
||||||
services:
|
services:
|
||||||
db:
|
db:
|
||||||
image: mysql
|
image: mysql
|
||||||
volumes:
|
volumes:
|
||||||
- ./.air/mysql:/var/lib/mysql
|
- ./../.air/mysql:/var/lib/mysql
|
||||||
|
environment:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||||
|
MYSQL_DATABASE: memos
|
||||||
api:
|
api:
|
||||||
image: cosmtrek/air
|
image: cosmtrek/air
|
||||||
working_dir: /work
|
working_dir: /work
|
||||||
@@ -11,8 +16,8 @@ services:
|
|||||||
- "MEMOS_DSN=root@tcp(db)/memos"
|
- "MEMOS_DSN=root@tcp(db)/memos"
|
||||||
- "MEMOS_DRIVER=mysql"
|
- "MEMOS_DRIVER=mysql"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/work/
|
- ./..:/work/
|
||||||
- .air/go-build:/root/.cache/go-build
|
- ./../.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:20-alpine
|
image: node:20-alpine
|
||||||
@@ -23,8 +28,7 @@ services:
|
|||||||
entrypoint: ["/bin/sh", "-c"]
|
entrypoint: ["/bin/sh", "-c"]
|
||||||
command: ["corepack enable && pnpm install && pnpm dev"]
|
command: ["corepack enable && pnpm install && pnpm dev"]
|
||||||
volumes:
|
volumes:
|
||||||
- ./web:/work
|
- ./../web:/work
|
||||||
- ./.air/node_modules/:/work/node_modules/ # Cache for Node Modules
|
|
||||||
|
|
||||||
# Services below are used for developers to run once
|
# Services below are used for developers to run once
|
||||||
#
|
#
|
||||||
@@ -43,8 +47,8 @@ services:
|
|||||||
working_dir: /work/proto
|
working_dir: /work/proto
|
||||||
command: generate
|
command: generate
|
||||||
volumes:
|
volumes:
|
||||||
- ./proto:/work/proto
|
- ./../proto:/work/proto
|
||||||
- ./web/src/types/:/work/web/src/types/
|
- ./../web/src/types/:/work/web/src/types/
|
||||||
|
|
||||||
# Do golang static code check before create PR
|
# Do golang static code check before create PR
|
||||||
golangci-lint:
|
golangci-lint:
|
||||||
@@ -55,8 +59,8 @@ services:
|
|||||||
command: run -v
|
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
|
- ./../.air/go-build:/root/.cache/go-build
|
||||||
- .:/work/
|
- ./..:/work/
|
||||||
|
|
||||||
# run npm
|
# run npm
|
||||||
npm:
|
npm:
|
||||||
@@ -66,5 +70,4 @@ services:
|
|||||||
environment: ["NPM_CONFIG_UPDATE_NOTIFIER=false"]
|
environment: ["NPM_CONFIG_UPDATE_NOTIFIER=false"]
|
||||||
entrypoint: "npm"
|
entrypoint: "npm"
|
||||||
volumes:
|
volumes:
|
||||||
- ./web:/work
|
- ./../web:/work
|
||||||
- ./.air/node_modules/:/work/node_modules/
|
|
||||||
|
1
web/.gitignore
vendored
1
web/.gitignore
vendored
@@ -1,4 +1,5 @@
|
|||||||
node_modules
|
node_modules
|
||||||
|
.pnpm-store
|
||||||
.DS_Store
|
.DS_Store
|
||||||
dist
|
dist
|
||||||
dist-ssr
|
dist-ssr
|
||||||
|
Reference in New Issue
Block a user