diff --git a/README.md b/README.md index 5bb5b33ce71de9ff13e3180de136f5fc57cd3682..8be66264f533f11579181e17545c2b04b0989c7d 100644 --- a/README.md +++ b/README.md @@ -80,15 +80,27 @@ On the host, this repo can then be cloned and pulled, and the image built and de #### update: - > export DOCKER_BUILD_DIR=$HOME/my_docker/atdb-ldv/atdb - > export DOCKER_COMPOSE_DIR=$DOCKER_BUILD_DIR/docker - > cd $DOCKER_BUILD_DIR - > git pull - > docker build -t atdb-ldv:latest . - > cd $DOCKER_COMPOSE_DIR - > docker-compose -f docker-compose-dev-pull-local.yml -p atdb up -d - or - > docker-compose -f docker-compose-production-pull-local.yml -p atdb up -d +This can be done with the `deploy_atdb_local_dev.sh` script. + +````commandline +#!/usr/bin/bash + +export ATDB_DIR=$HOME/my_docker/atdb-ldv + +while true; do + cd $ATDB_DIR + git pull + + # Proceed with build and redeploy, this only does something when new changes were detected by the git pull + cd atdb + docker build -t atdb-ldv:latest . + docker-compose -f docker/docker-compose-dev-pull-local.yml -p atdb up -d + + sleep 60 # Wait for 1 minute before the next iteration + +done +```` + #### Database changes and migrations When the `models.py` is changed, then the database must be migrated. diff --git a/atdb/taskdatabase/templates/taskdatabase/index.html b/atdb/taskdatabase/templates/taskdatabase/index.html index 758ed0673dfa71def0f87ac80f37f17a445cc0bf..c0ca8e7c770f8bfad096aeccfa5e281e2cb05ea7 100644 --- a/atdb/taskdatabase/templates/taskdatabase/index.html +++ b/atdb/taskdatabase/templates/taskdatabase/index.html @@ -31,7 +31,7 @@ {% include 'taskdatabase/pagination.html' %} </div> </div> - <p class="footer"> Version 10 Dec 2024 - 15:00</p> + <p class="footer"> Version 10 Dec 2024 - 15:15</p> </div> {% include 'taskdatabase/refresh.html' %} diff --git a/deploy_atdb_local_prod.sh b/deploy_atdb_local_prod.sh new file mode 100644 index 0000000000000000000000000000000000000000..1fa9352ea15a000eeae5618a4dd7cadf052a9650 --- /dev/null +++ b/deploy_atdb_local_prod.sh @@ -0,0 +1,16 @@ +#!/usr/bin/bash + +export ATDB_DIR=$HOME/my_docker/atdb-ldv + +while true; do + cd $ATDB_DIR + git pull + + # Proceed with build and redeploy, this only does something when new changes were detected by the git pull + cd atdb + docker build -t atdb-ldv:latest . + docker-compose -f docker/docker-compose-production-pull-local.yml -p atdb up -d + + sleep 60 # Wait for 1 minute before the next iteration + +done \ No newline at end of file