dodane build i deploy skripte
This commit is contained in:
@@ -25,16 +25,14 @@ The deployment is done via Docker:
|
||||
## Building Docker image
|
||||
Run the following command:
|
||||
```bash
|
||||
docker build . -t utility-bills-tracker:1.0.0
|
||||
build.sh
|
||||
```
|
||||
The image will be stored in the local Docker instance.
|
||||
|
||||
## Deploying Docker service
|
||||
Run the following command:
|
||||
```bash
|
||||
docker stack deploy \
|
||||
-c docker-compose-deploy.yml \
|
||||
utility-bills-tracker
|
||||
deploy.sh
|
||||
```
|
||||
|
||||
# Implementation details
|
||||
|
||||
15
build.sh
Executable file
15
build.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$1" == "" ] ; then
|
||||
printf "\nNisi zadao verziju Docker image-a koji treba buildati"
|
||||
printf "\n\nSintaksa:\n\n build-prod-img.sh 1.0.0\n\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf "\nBUILD START ...\n\n"
|
||||
|
||||
IMAGE_VERSION=$1
|
||||
|
||||
docker build . -t utility-bills-tracker:$IMAGE_VERSION
|
||||
|
||||
printf "\nBUILD DONE!\n\n"
|
||||
Reference in New Issue
Block a user