Skip to content

Latest commit

 

History

History
76 lines (52 loc) · 1.92 KB

README.md

File metadata and controls

76 lines (52 loc) · 1.92 KB

CameraTrap 2023

Development

docker compose up

default config use compose.yml and compose.override.yml

開發流程:

docker-compose up

default will use compose.yml & compose.override.yml

  1. fork repo from TaiBIF github to personal github account (first time)
  2. debug start from devel branch (github default branch)
  3. create new branch git co -b fix-xxx
  4. git commit
  5. git checkout devel & git merge fix-xxx,
  6. git push origin devel
  7. create Pull requests in github & merge to TaiBIF/devel

正式站就 merge to main branch

PostgreSQL

sync staging/production server database data:

  1. Delete or backup .//ct22-volumes/pgdata
  2. Get dump gziped sql file from server
  3. put it in initdb folder
  4. docker compose up

Deployment

Staging

docker-compose -f compose.yml -f compose.staging.yml build / up

Production

docker-compose -f compose.yml -f compose.prod.yml build / up

Spec

Data Model

  • DeploymentJournal: 相機行程
  • DeploymentStat: 相機位置工作時數
  • script/import-deployment-stat.py 計算/匯入工作時數

Nginx & Let's Encrypt for HTTPS

Setup referece

Scripts:

NOTES:

  1. Open port 443 on EC2
  2. Link nginx to django in docker config otherwise nginx cannot find correct upstream
  3. Make sure to check if data path & docker-compose yml filename in init-letsencrypt.sh are correct
  4. When developinglocally by docker, https (provided by nginx) will not be available, so login through ORCID will fail.

Deployment

gunicorn should add --limit-request-line 8190, otherwise the search page download api may cause verbose querystring too long error