Skip to content

Commit 373f9f1

Browse files
committed
✨ Replace 'pnpm setup' with 'pnpm init-project' across documentation and scripts for consistency in project initialization
1 parent 119546c commit 373f9f1

File tree

7 files changed

+19
-19
lines changed

7 files changed

+19
-19
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
```bash
2020
docker compose --profile production up -d
2121
# or
22-
pnpm setup && pnpm dev
22+
pnpm init-project && pnpm dev
2323
```
2424

2525
<p align="center">
@@ -93,7 +93,7 @@ Before running the application in production mode for the first time, you need t
9393

9494
```bash
9595
# Initialize the database for production mode
96-
pnpm setup
96+
pnpm init-project
9797
```
9898

9999
This will create the necessary tables. On first launch, you'll be guided through creating your admin account with a secure password.
@@ -125,7 +125,7 @@ Gitea Mirror also provides multi-architecture Docker images that work on both AR
125125
docker compose --profile production up -d
126126

127127
# For development mode (requires configuration)
128-
# Ensure you have run pnpm setup first
128+
# Ensure you have run pnpm init-project first
129129
docker compose -f docker-compose.dev.yml up -d
130130
```
131131

@@ -221,7 +221,7 @@ git clone https://github.com/arunavo4/gitea-mirror.git
221221
cd gitea-mirror
222222

223223
# Quick setup (installs dependencies and initializes the database)
224-
pnpm setup
224+
pnpm init-project
225225

226226
# Development Mode Options
227227

@@ -277,7 +277,7 @@ Key configuration options include:
277277

278278
```bash
279279
# Install dependencies
280-
pnpm setup
280+
pnpm init-project
281281

282282
# Start the development server
283283
pnpm dev

docker-entrypoint.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ set -e
55
# Ensure data directory exists
66
mkdir -p /app/data
77

8-
# If pnpm is available, run setup (for dev images), else run node init directly
8+
# If pnpm is available, run init-project (for dev images), else run node init directly
99
if command -v pnpm >/dev/null 2>&1; then
10-
echo "Running pnpm setup (if needed)..."
11-
pnpm setup || true
10+
echo "Running pnpm init-project (if needed)..."
11+
pnpm init-project || true
1212
fi
1313

1414
# Initialize the database if it doesn't exist

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"node": ">=22.0.0"
77
},
88
"scripts": {
9-
"setup": "pnpm install && pnpm manage-db init",
9+
"init-project": "pnpm install && pnpm manage-db init",
1010
"dev": "astro dev",
1111
"dev:clean": "pnpm cleanup-db && pnpm manage-db init && astro dev",
1212
"build": "astro build",

scripts/README-docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ The script uses environment variables from the `.env` file in the project root:
4343
3. Using with docker-compose:
4444
```bash
4545
# Ensure dependencies are installed and database is initialized
46-
pnpm setup
46+
pnpm init-project
4747

4848
# First build the image
4949
./scripts/build-docker.sh --load
50-
50+
5151
# Then run using docker-compose for development
5252
docker-compose -f ../docker-compose.dev.yml up -d
5353

scripts/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ pnpm update-schema
4444
pnpm cleanup-db
4545

4646
# Complete setup (install dependencies and initialize database)
47-
pnpm setup
47+
pnpm init-project
4848

4949
# Start development server with a fresh database
5050
pnpm dev:clean

scripts/docker-diagnostics.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if command -v docker &> /dev/null; then
1818
echo -e "${GREEN}✓ Docker is installed${NC}"
1919
if docker info &> /dev/null; then
2020
echo -e "${GREEN}✓ Docker daemon is running${NC}"
21-
21+
2222
# Get Docker version
2323
DOCKER_VERSION=$(docker version --format '{{.Server.Version}}')
2424
echo -e "${GREEN}✓ Docker version: $DOCKER_VERSION${NC}"
@@ -49,7 +49,7 @@ echo -e "\n${YELLOW}Checking Docker Buildx...${NC}"
4949
if docker buildx version &> /dev/null; then
5050
BUILDX_VERSION=$(docker buildx version | head -n1 | awk '{print $2}')
5151
echo -e "${GREEN}✓ Docker Buildx is installed (v$BUILDX_VERSION)${NC}"
52-
52+
5353
# List available builders
5454
echo -e "\n${YELLOW}Available builders:${NC}"
5555
docker buildx ls
@@ -82,13 +82,13 @@ fi
8282
echo -e "\n${YELLOW}Checking environment configuration...${NC}"
8383
if [ -f .env ]; then
8484
echo -e "${GREEN}✓ .env file exists${NC}"
85-
85+
8686
# Parse .env file safely
8787
if [ -f .env ]; then
8888
REGISTRY=$(grep DOCKER_REGISTRY .env | cut -d= -f2)
8989
IMAGE=$(grep DOCKER_IMAGE .env | cut -d= -f2)
9090
TAG=$(grep DOCKER_TAG .env | cut -d= -f2)
91-
91+
9292
echo -e "Docker image configuration:"
9393
echo -e " Registry: ${BLUE}${REGISTRY:-"Not set (will use default)"}${NC}"
9494
echo -e " Image: ${BLUE}${IMAGE:-"Not set (will use default)"}${NC}"
@@ -105,12 +105,12 @@ echo -e "${BLUE} Recommendations ${NC}"
105105
echo -e "${BLUE}=====================================================${NC}"
106106

107107
echo -e "\n${YELLOW}For local development:${NC}"
108-
echo -e "1. ${GREEN}pnpm setup${NC} (initialize database and install dependencies)"
108+
echo -e "1. ${GREEN}pnpm init-project${NC} (initialize database and install dependencies)"
109109
echo -e "2. ${GREEN}./scripts/build-docker.sh --load${NC} (build and load into Docker)"
110110
echo -e "3. ${GREEN}docker-compose -f docker-compose.dev.yml up -d${NC} (start the development container)"
111111

112112
echo -e "\n${YELLOW}For production deployment (using Docker Compose):${NC}"
113-
echo -e "1. ${GREEN}pnpm setup${NC} (if not already done, to ensure database schema is ready)"
113+
echo -e "1. ${GREEN}pnpm init-project${NC} (if not already done, to ensure database schema is ready)"
114114
echo -e "2. ${GREEN}docker-compose --profile production up -d${NC} (start the production container)"
115115

116116
echo -e "\n${YELLOW}For CI/CD builds:${NC}"

src/content/docs/quickstart.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ If you prefer to run the application directly on your system:
5151

5252
2. Run the quick setup script:
5353
```bash
54-
pnpm setup
54+
pnpm init-project
5555
```
5656
This installs dependencies and initializes the database.
5757

0 commit comments

Comments
 (0)