Skip to content

Commit 98977dd

Browse files
committed
feat: full iac
1 parent 9bc9f32 commit 98977dd

File tree

8 files changed

+31
-0
lines changed

8 files changed

+31
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ static/
22

33
*/*
44
!.github/**/*
5+
!.scripts/**/*
56
!*/compose.yml

.scripts/update.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# Exit immediately if a command exits with a non-zero status
4+
set -e
5+
6+
# Pull the latest changes
7+
git pull origin main
8+
9+
# Iterate over each directory in the current directory
10+
for dir in */; do
11+
# Skip certain directories
12+
if [ "$dir" == ".scripts/" ]; then
13+
continue
14+
fi
15+
16+
if [ "$dir" == "static/" ]; then
17+
continue
18+
fi
19+
20+
# Navigate into the directory
21+
cd "$dir"
22+
23+
# Deploy using docker-compose if the file exists
24+
if [ -f "docker-compose.yml" ]; then
25+
docker-compose up -d
26+
fi
27+
28+
# Navigate back to the parent directory
29+
cd ..
30+
done
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)