improved deployment for testing environment

This commit is contained in:
simon 2021-09-10 16:04:46 +07:00
parent ded23399a9
commit 9397560734
4 changed files with 19 additions and 3 deletions

View File

@ -16,3 +16,6 @@ venv/
# Unneeded graphics
assets/*
# for local testing only
testing.sh

3
.gitignore vendored
View File

@ -6,6 +6,3 @@ db.sqlite3
# frontend fonts
*ttf.woff
# for local testing only
testing.sh

View File

@ -16,6 +16,8 @@ function sync_blackhole {
export PASS=$remote_pw
rsync -a --progress --delete-after \
--exclude ".git" \
--exclude ".gitignore" \
--exclude "**/cache" \
--exclude "**/__pycache__/" \
--exclude "db.sqlite3" \
@ -32,6 +34,8 @@ function sync_test {
host="tubearchivist.local"
rsync -a --progress --delete-after \
--exclude ".git" \
--exclude ".gitignore" \
--exclude "**/cache" \
--exclude "**/__pycache__/" \
--exclude "db.sqlite3" \
@ -42,6 +46,9 @@ function sync_test {
ssh "$host" 'docker build -t bbilly1/tubearchivist:latest tubearchivist'
ssh "$host" 'docker-compose -f docker/docker-compose.yml up -d'
ssh "$host" 'docker cp tubearchivist/tubearchivist/testing.sh tubearchivist:/app/testing.sh'
ssh "$host" 'docker exec tubearchivist chmod +x /app/testing.sh'
}

9
tubearchivist/testing.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
# install debug and testing tools into slim container
apt update && apt install -y vim htop bmon net-tools iputils-ping procps
pip install ipython
##
exit 0