Skip to content

Commit

Permalink
Merge branch 'main' of github.com:cuixueshe/earthworm
Browse files Browse the repository at this point in the history
  • Loading branch information
cuixiaorui committed Jan 25, 2024
2 parents 7007157 + b5ce312 commit 789d6fc
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
DATABASE_URL="mysql://root:[email protected]:3306/earthworm_nest"
SECRET="sjldk92#sd903mnc./xklsjdf9sdfj"
34 changes: 34 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Earthworm

## How to run


1. Install dependencies
mac:
```bash
brew install docker orbstack
```
win:
install [docker-desktop](https://www.docker.com/products/docker-desktop/)

2. open orbstack

3. run commands
```bash
## In this project directory
## Run sql and redis services
docker compose up -d
## Configure environment variables
cp .env.example .env
pnpm install
pnpm db:init
pnpm data:init
```
4. run serve
```bash
pnpm serve:dev
```
5. run client
```bash
pnpm client:dev
```
23 changes: 23 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
version: '3.8'

services:
mysql:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: earthworm_nest
volumes:
- data:/var/lib/mysql
command: --default-authentication-plugin=mysql_native_password
ports:
- "3306:3306"
redis:
image: redis:5-alpine
restart: always
volumes:
- data:/var/lib/redis
ports:
- 6379:6379
volumes:
data:
driver: local

0 comments on commit 789d6fc

Please sign in to comment.