-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpush.sh
executable file
·37 lines (32 loc) · 858 Bytes
/
push.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
33
34
35
36
37
#!/usr/bin/env bash
env=$1
if [[ $env == "" ]]
then
echo ""
echo "!!! ---- Attention!! Must specify one of (local/stg/prd) environments! ---- "
echo ""
echo "Usage: $0 <env>"
echo "Example: $0 local"
echo ""
exit 0
fi
if [[ $env == "prd" ]]
then
echo "Push to prod"
heroku container:push web --app me-maintenance
heroku container:release web --app me-maintenance
heroku logs --tail --app me-maintenance
fi
if [[ $env == "stg" ]]
then
echo "Push to stage"
heroku container:push web --app me-maintenance-staging
heroku container:release web --app me-maintenance-staging
heroku ps:scale web=1 --app me-maintenance-staging # why isn't this done automatically?
heroku logs --tail --app me-maintenance-staging
fi
if [[ $env == "local" ]]
then
docker build -t flutterapp .
docker run -e PORT=8000 -p 1200:8000 flutterapp
fi