Skip to content

Commit 29cfb31

Browse files
committed
Use floating tag
1 parent 210725b commit 29cfb31

16 files changed

+49
-21
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,13 @@ Then, configure your environment:
7373
- For miners, edit files matching `env.subvortex.miner.*`
7474
- For validators, edit files matching `env.subvortex.validator.*`
7575

76-
2. Update the main Auto Upgrader `.env` file at:
77-
```
78-
subvortex/auto_upgrader/.env
79-
```
76+
2. Set up `.env` file.
77+
78+
```bash
79+
cp subvortex/auto_upgrader/env.template subvortex/auto_upgrader/.env
80+
```
81+
82+
3. Customise `.env` file by adjusting the values as needed.
8083

8184
Here's a breakdown of the key variables:
8285

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.0.1
1+
0.0.2-alpha.1

docker-compose.local.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
services:
22
auto_upgrader:
33
build:
4-
context: ../../
4+
context: .
55
dockerfile: ./subvortex/auto_upgrader/Dockerfile
66
additional_contexts:
77
wheelbuilder: docker-image://subvortex/subvortex-wheel-builder:latest

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
auto_upgrader:
3-
image: subvortex/subvortex-auto-upgrader:latest
3+
image: subvortex/subvortex-auto-upgrader:${SUBVORTEX_AUTO_UPGRADER_FLOATING_TAG}
44
container_name: subvortex-auto-upgrader
55
restart: unless-stopped
66
env_file:

scripts/auto_upgrader/auto_upgrader_setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ setup_process() {
6363
./scripts/install_pm2.sh
6464

6565
# Setup the auto upgrade as process
66-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_setup.sh
66+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_setup.sh
6767

6868
# Add any other logic specific to process mode here
6969
echo "✅ Process setup complete."

scripts/auto_upgrader/auto_upgrader_start.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ setup_process() {
6666
echo "⚙️ Setting up for 'process' mode..."
6767

6868
# Start the auto upgrade as process
69-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_start.sh
69+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_start.sh
7070

7171
# Add any other logic specific to process mode here
7272
echo "✅ Process started."

scripts/auto_upgrader/auto_upgrader_stop.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ setup_process() {
4848
echo "⚙️ Setting up for 'process' mode..."
4949

5050
# Stop the auto upgrade as process
51-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_stop.sh
51+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_stop.sh
5252

5353
# Add any other logic specific to process mode here
5454
echo "✅ Process stopped."

scripts/auto_upgrader/auto_upgrader_teardown.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ setup_process() {
4848
echo "⚙️ Setting up for 'process' mode..."
4949

5050
# Teardown the auto upgrade as process
51-
./subvortex/auto_upgrader/deployment/proecss/auto_upgrader_process_teardown.sh
51+
./subvortex/auto_upgrader/deployment/process/auto_upgrader_process_teardown.sh
5252

5353
# Add any other logic specific to process mode here
5454
echo "✅ Process teardown complete."

subvortex/auto_upgrader/deployment/container/auto_upgrader_container_setup.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,19 @@ if ! command -v docker &> /dev/null; then
1212
./../../scripts/docker/docker_setup.sh
1313
fi
1414

15+
if command -v docker &> /dev/null && docker compose version &> /dev/null; then
16+
DOCKER_CMD="docker compose"
17+
elif command -v docker-compose &> /dev/null; then
18+
DOCKER_CMD="docker-compose"
19+
else
20+
echo "❌ Neither 'docker compose' nor 'docker-compose' is installed. Please install Docker Compose."
21+
exit 1
22+
fi
23+
24+
if [ -n "$SUBVORTEX_LOCAL" ]; then
25+
$DOCKER_CMD -f ../../docker-compose.local.yml build auto_upgrader
26+
else
27+
$DOCKER_CMD -f ../../docker-compose.yml build auto_upgrader
28+
fi
29+
1530
echo "✅ Auto Upgrader setup successfully"

subvortex/auto_upgrader/deployment/container/auto_upgrader_container_start.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ fi
2222
# Install watchtower
2323
./../../scripts/watchtower/watchtower_start.sh
2424

25-
# Install the auto upgrader
26-
$DOCKER_CMD -f ../../docker-compose.yml up auto_upgrader -d --no-deps
25+
if [ -n "$SUBVORTEX_LOCAL" ]; then
26+
$DOCKER_CMD -f ../../docker-compose.local.yml up auto_upgrader -d --no-deps
27+
else
28+
$DOCKER_CMD -f ../../docker-compose.yml up auto_upgrader -d --no-deps
29+
fi
2730

2831
echo "✅ Auto Upgrader started successfully"

0 commit comments

Comments
 (0)