more script updates
This commit is contained in:
parent
bff6b5ac21
commit
3d2a4209fc
@ -5,7 +5,7 @@
|
||||
|
||||
set -e
|
||||
|
||||
BASE_URL="http://localhost:9876"
|
||||
BASE_URL="http://localhost:9877"
|
||||
BLOSSOM_URL="http://localhost:8081"
|
||||
GRAFANA_URL="http://localhost:3000"
|
||||
PROMETHEUS_URL="http://localhost:9090"
|
||||
|
@ -188,6 +188,9 @@ if [ "$SKIP_BUILD" = false ]; then
|
||||
# Install Go dependencies
|
||||
go mod download
|
||||
|
||||
# Create bin directory if it doesn't exist
|
||||
mkdir -p bin
|
||||
|
||||
# Build binary
|
||||
go build -o bin/gateway \
|
||||
-ldflags "-X main.version=$(git describe --tags --always 2>/dev/null || echo 'dev') -X main.buildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -s -w" \
|
||||
|
@ -72,11 +72,14 @@ fi
|
||||
|
||||
# Build application
|
||||
echo "🔨 Building application..."
|
||||
go build -o bin/torrentGateway \
|
||||
-ldflags "-X main.version=$(git describe --tags --always) -X main.buildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -s -w" \
|
||||
cmd/gateway/*.go
|
||||
# Create bin directory if it doesn't exist
|
||||
mkdir -p bin
|
||||
|
||||
if [ ! -f "bin/torrentGateway" ]; then
|
||||
go build -o bin/gateway \
|
||||
-ldflags "-X main.version=$(git describe --tags --always) -X main.buildTime=$(date -u +%Y-%m-%dT%H:%M:%SZ) -s -w" \
|
||||
./cmd/gateway
|
||||
|
||||
if [ ! -f "bin/gateway" ]; then
|
||||
echo "❌ Build failed"
|
||||
exit 1
|
||||
fi
|
||||
@ -88,14 +91,14 @@ mkdir -p "$INSTALL_DIR"/{bin,data,configs,logs,backups,web}
|
||||
mkdir -p "$INSTALL_DIR/data"/{blobs,chunks,transcoded,thumbnails,metadata}
|
||||
|
||||
# Copy files
|
||||
cp bin/torrentGateway "$INSTALL_DIR/bin/"
|
||||
cp bin/gateway "$INSTALL_DIR/bin/"
|
||||
cp -r configs/* "$INSTALL_DIR/configs/" 2>/dev/null || true
|
||||
cp -r internal/web "$INSTALL_DIR/"
|
||||
cp -r scripts "$INSTALL_DIR/"
|
||||
|
||||
# Set permissions
|
||||
chown -R "$SERVICE_USER:$SERVICE_GROUP" "$INSTALL_DIR"
|
||||
chmod +x "$INSTALL_DIR/bin/torrentGateway"
|
||||
chmod +x "$INSTALL_DIR/bin/gateway"
|
||||
chmod +x "$INSTALL_DIR/scripts"/*.sh
|
||||
|
||||
echo "✅ Installation directory configured"
|
||||
@ -113,7 +116,7 @@ Type=simple
|
||||
User=torrent-gateway
|
||||
Group=torrent-gateway
|
||||
WorkingDirectory=/opt/torrent-gateway
|
||||
ExecStart=/opt/torrent-gateway/bin/torrentGateway
|
||||
ExecStart=/opt/torrent-gateway/bin/gateway
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
StandardOutput=journal
|
||||
|
Loading…
x
Reference in New Issue
Block a user