Skip to content

Commit 29674d6

Browse files
author
yiiman-dev
committed
Improve service install script
1 parent fe5ca3d commit 29674d6

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

.env.exampe

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
# Server Configuration
2-
PORT=8000
3-
HOST=localhost
2+
PORT=3400
3+
HOST=0.0.0.0
44

55
# Security
66
API_KEY=your-secure-api-key-here
7-
CLI_COMMAND=docker compose up -d
7+
CLI_COMMAND="docker compose up -d"
88
# CLI Command Configuration
99
CLI_WORKING_DIR=~

install-service.sh

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ if [ "$EUID" -ne 0 ]; then
1010
fi
1111

1212
# Configuration
13-
PROJECT_DIR="/opt/cicd-cli-controller"
13+
PROJECT_DIR=$(PWD)
1414
SERVICE_NAME="cicd-cli-controller"
1515
SERVICE_USER="cicd-service"
16-
NODE_VERSION="20.x"
16+
NODE_VERSION="19.x"
1717

1818
echo "Installing CICD CLI Controller Service..."
1919

@@ -29,13 +29,10 @@ if ! id "$SERVICE_USER" &>/dev/null; then
2929
useradd -r -s /bin/false $SERVICE_USER
3030
fi
3131

32-
# Create project directory and set permissions
33-
mkdir -p $PROJECT_DIR
34-
cp -r ./* $PROJECT_DIR/
32+
3533
chown -R $SERVICE_USER:$SERVICE_USER $PROJECT_DIR
3634

3735
# Install dependencies
38-
cd $PROJECT_DIR
3936
npm install --production
4037

4138
# Create systemd service file

0 commit comments

Comments
 (0)