mirror of
https://github.com/shadcn-ui/taxonomy
synced 2026-05-24 09:48:32 +00:00
Merge 9b1a7e0b82 into 298a8857c7
This commit is contained in:
commit
fc5697ce3e
5 changed files with 66 additions and 1 deletions
|
|
@ -60,6 +60,8 @@ If you have some suggestions, feel free to create an issue.
|
|||
|
||||
## Running Locally
|
||||
|
||||
### With pnpm
|
||||
|
||||
1. Install dependencies using pnpm:
|
||||
|
||||
```sh
|
||||
|
|
@ -78,6 +80,12 @@ cp .env.example .env.local
|
|||
pnpm dev
|
||||
```
|
||||
|
||||
### With Docker and docker compose
|
||||
|
||||
```sh
|
||||
pnpm docker-dev
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
Licensed under the [MIT license](https://github.com/shadcn/taxonomy/blob/main/LICENSE.md).
|
||||
|
|
|
|||
7
docker-run.sh
Executable file
7
docker-run.sh
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
OPTS="-f ./docker/docker-compose.yml"
|
||||
|
||||
docker-compose $OPTS down --volumes
|
||||
docker-compose $OPTS up -d db
|
||||
docker-compose $OPTS up -d web
|
||||
10
docker/Dockerfile
Normal file
10
docker/Dockerfile
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
FROM node:20 as base
|
||||
RUN npm install -g pnpm
|
||||
|
||||
COPY ../ /app
|
||||
WORKDIR /app
|
||||
|
||||
FROM base as base_build
|
||||
|
||||
RUN sh -c 'yes | pnpm install'
|
||||
|
||||
39
docker/docker-compose.yml
Normal file
39
docker/docker-compose.yml
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
web:
|
||||
build:
|
||||
target: base_build
|
||||
context: ../
|
||||
dockerfile: ./docker/Dockerfile
|
||||
args:
|
||||
- BUILDKIT_INLINE_CACHE=1
|
||||
ports:
|
||||
- "3000:3000"
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ../:/app
|
||||
- ./.env.local:/app/.env.local
|
||||
command: [
|
||||
"pnpm",
|
||||
"dev"
|
||||
]
|
||||
|
||||
db:
|
||||
image: mysql:5.7
|
||||
restart: always
|
||||
environment:
|
||||
MYSQL_DATABASE: 'db'
|
||||
MYSQL_USER: 'user'
|
||||
MYSQL_PASSWORD: 'password'
|
||||
MYSQL_ROOT_PASSWORD: 'password'
|
||||
ports:
|
||||
- '3306:3306'
|
||||
expose:
|
||||
- '3306'
|
||||
volumes:
|
||||
- my-db:/var/lib/mysql
|
||||
|
||||
# Names our volume
|
||||
volumes:
|
||||
my-db:
|
||||
|
|
@ -13,7 +13,8 @@
|
|||
"start": "next start",
|
||||
"lint": "next lint",
|
||||
"preview": "next build && next start",
|
||||
"postinstall": "prisma generate"
|
||||
"postinstall": "prisma generate",
|
||||
"docker-dev": "./docker-run.sh"
|
||||
},
|
||||
"dependencies": {
|
||||
"@editorjs/code": "^2.8.0",
|
||||
|
|
|
|||
Loading…
Reference in a new issue