feat: add gitlab-ci, logrotate setup and deploy alerts
This commit is contained in:
1 parent
b688760309
commit
d4e4711a77
4 files changed
+55
-2
No files matched your search
@@ -0,0 +1,33 @@
|
||||
image: node:26
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
|
||||
cache:
|
||||
paths:
|
||||
- node_modules/
|
||||
|
||||
before_script:
|
||||
- corepack enable
|
||||
- pnpm install --frozen-lockfile
|
||||
|
||||
lint:
|
||||
stage: test
|
||||
script:
|
||||
- pnpm run lint
|
||||
|
||||
typecheck:
|
||||
stage: test
|
||||
script:
|
||||
- pnpm run typecheck
|
||||
|
||||
test:
|
||||
stage: test
|
||||
script:
|
||||
- pnpm run test
|
||||
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
- pnpm run build
|
||||
@@ -18,6 +18,12 @@ echo "Stopping containers..."
|
||||
docker compose down
|
||||
|
||||
echo "Starting deployment..."
|
||||
docker compose up -d --build
|
||||
if docker compose up -d --build; then
|
||||
./scripts/alert.sh "Deployment successful for EpicNext-Cms"
|
||||
echo "--- Deployment successful ---"
|
||||
else
|
||||
./scripts/alert.sh "Deployment FAILED for EpicNext-Cms"
|
||||
echo "--- Deployment FAILED ---"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "--- Deployment initiated ---"
|
||||
@@ -0,0 +1,7 @@
|
||||
/var/www/atom-nexst/logs/*.log /var/www/atom-nexst/*.log {
|
||||
daily
|
||||
rotate 7
|
||||
compress
|
||||
missingok
|
||||
notifempty
|
||||
}
|
||||
Executable
+7
@@ -0,0 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Setup log rotation
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
CONFIG_FILE="$SCRIPT_DIR/logrotate.conf"
|
||||
|
||||
echo "To apply log rotation, run:"
|
||||
echo "sudo cp $CONFIG_FILE /etc/logrotate.d/epicnext-cms"
|
||||
Reference in new issue
Block a user