-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b6d283
commit 85bfb0c
Showing
3 changed files
with
38 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
arg1="$1" | ||
arg2="$2" | ||
|
||
# optionally prune/clear system and cache prior to build | ||
if [ "$arg1" == "-p" ]; then | ||
yes | docker system prune -a | ||
yes | docker buildx prune -a | ||
fi | ||
|
||
# remove old spec, create new | ||
sudo rm compose_api/spec/openapi_3_1_0_generated.yaml | ||
cd compose_api && python3 openapi_spec.py && cd .. | ||
|
||
# remove pycache to clean images | ||
sudo rm -r compose_api/__pycache__ | ||
sudo rm -r compose_worker/__pycache__ | ||
|
||
# build and push containers | ||
docker compose build --no-cache | ||
|
||
if [ "$arg2" == "-r" ]; then | ||
docker compose up | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters