Skip to content
Snippets Groups Projects
Commit a3033381 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

update script

parent 81e3c5fd
No related branches found
No related tags found
No related merge requests found
......@@ -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.
......
......@@ -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' %}
......
#!/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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment