dodane build i deploy skripte
This commit is contained in:
@@ -25,16 +25,14 @@ The deployment is done via Docker:
|
|||||||
## Building Docker image
|
## Building Docker image
|
||||||
Run the following command:
|
Run the following command:
|
||||||
```bash
|
```bash
|
||||||
docker build . -t utility-bills-tracker:1.0.0
|
build.sh
|
||||||
```
|
```
|
||||||
The image will be stored in the local Docker instance.
|
The image will be stored in the local Docker instance.
|
||||||
|
|
||||||
## Deploying Docker service
|
## Deploying Docker service
|
||||||
Run the following command:
|
Run the following command:
|
||||||
```bash
|
```bash
|
||||||
docker stack deploy \
|
deploy.sh
|
||||||
-c docker-compose-deploy.yml \
|
|
||||||
utility-bills-tracker
|
|
||||||
```
|
```
|
||||||
|
|
||||||
# Implementation details
|
# 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