This commit is contained in:
Jesus Mejuto 2026-04-20 16:50:07 +00:00 committed by GitHub
commit fc5697ce3e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 66 additions and 1 deletions

View file

@ -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
View 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
View 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
View 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:

View file

@ -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",