-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstartup.sh
32 lines (25 loc) · 1.13 KB
/
startup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env bash
## startup.sh
## Startup foolstack in the proper order
echo "startup.sh: Starting up foolstack SeaweedFS + Torako + Ayase..."
echo "startup.sh: This takes at least 1 minutes, go grab a coffee."
## Startup seaweedfs + database containers
echo "startup.sh: First docker-compose (weed+mysql)..."
docker-compose -f "docker-compose.yml" up -d
echo "startup.sh: First docker-compose returned"
sleep 30 ## Safety margin for containers to startup properly.
## Ensure S3 buckets exist:
echo "startup.sh: Creating buckets..."
docker exec -i seaweed-master /usr/bin/weed shell -master=seaweed-master:9333 -filer=seaweed-filer:8888 <<EOF
s3.bucket.create -name asagi-thumbs
s3.bucket.create -name asagi-images
exit
EOF
echo "startup.sh: Creating buckets returned."
sleep 30 ## Safety margin for bucket creation.
## Add torako and ayase containers to established group:
echo "startup.sh: Second docker-compose (torako+ayase)..."
docker-compose -f "docker-compose.yml" -f "docker-compose.ayase.yml" up -d
echo "startup.sh: Second docker-compose returned"
echo "startup.sh: Foolstack should now be running."
echo "startup.sh: Finsihed."