@gv-sh/specgen-app 0.13.1 โ 0.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/scripts/deploy-ec2.sh +9 -6
package/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# SpecGen App - Complete Platform
|
2
2
|
|
3
|
-
[](https://github.com/gv-sh/specgen-app)
|
4
4
|
|
5
5
|
A unified deployment package for the SpecGen speculative fiction generator platform. **Optimized for port 80 deployment with low memory usage.**
|
6
6
|
|
package/package.json
CHANGED
package/scripts/deploy-ec2.sh
CHANGED
@@ -28,7 +28,7 @@ run_on_ec2() {
|
|
28
28
|
|
29
29
|
echo "๐งน Stopping existing services..."
|
30
30
|
run_on_ec2 "
|
31
|
-
cd '$APP_DIR' 2>/dev/null || true
|
31
|
+
cd '$APP_DIR/server' 2>/dev/null || true
|
32
32
|
npx pm2 stop specgen 2>/dev/null || true
|
33
33
|
npx pm2 delete specgen 2>/dev/null || true
|
34
34
|
"
|
@@ -36,7 +36,7 @@ run_on_ec2 "
|
|
36
36
|
echo "๐ฅ Updating repository..."
|
37
37
|
run_on_ec2 "
|
38
38
|
if [ -d '$APP_DIR' ]; then
|
39
|
-
cd '$APP_DIR' && git pull origin main
|
39
|
+
cd '$APP_DIR' && git stash && git pull origin main
|
40
40
|
else
|
41
41
|
git clone '$REPO_URL' '$APP_DIR'
|
42
42
|
fi
|
@@ -46,6 +46,9 @@ echo "๐ฆ Setting up dependencies..."
|
|
46
46
|
run_on_ec2 "
|
47
47
|
cd '$APP_DIR'
|
48
48
|
npm run setup
|
49
|
+
|
50
|
+
# Install cross-env in user directory
|
51
|
+
cd user && npm install cross-env --save-dev && cd ..
|
49
52
|
"
|
50
53
|
|
51
54
|
echo "๐๏ธ Building applications..."
|
@@ -58,7 +61,7 @@ run_on_ec2 "
|
|
58
61
|
|
59
62
|
# Build user interface with production API URL
|
60
63
|
echo 'Building user interface...'
|
61
|
-
cd user && npm run build && cd ..
|
64
|
+
cd user && cross-env REACT_APP_API_URL=/api npm run build && cd ..
|
62
65
|
|
63
66
|
echo 'โ
Builds completed'
|
64
67
|
"
|
@@ -99,7 +102,7 @@ EOF
|
|
99
102
|
|
100
103
|
echo "๐ Starting application..."
|
101
104
|
run_on_ec2 "
|
102
|
-
cd '$APP_DIR'
|
105
|
+
cd '$APP_DIR/server'
|
103
106
|
npx pm2 start ecosystem.config.js
|
104
107
|
"
|
105
108
|
|
@@ -119,11 +122,11 @@ if [ "$HEALTH_CHECK" = "healthy" ]; then
|
|
119
122
|
echo " Health Check: http://52.66.251.12/api/health"
|
120
123
|
echo ""
|
121
124
|
echo "๐ Server status:"
|
122
|
-
run_on_ec2 "npx pm2 status"
|
125
|
+
run_on_ec2 "cd '$APP_DIR/server' && npx pm2 status"
|
123
126
|
else
|
124
127
|
echo "โ Deployment failed - health check returned: $HEALTH_CHECK"
|
125
128
|
echo "๐ Checking logs..."
|
126
|
-
run_on_ec2 "npx pm2 logs specgen --lines 10"
|
129
|
+
run_on_ec2 "cd '$APP_DIR/server' && npx pm2 logs specgen --lines 10"
|
127
130
|
exit 1
|
128
131
|
fi
|
129
132
|
|