Skip to content

moogoo78/camera-trap-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 22.2%
  • Python 22.3%
  • HTML 17.5%
  • CSS 16.1%
  • SCSS 11.0%
  • Less 10.6%
  • Other 0.3%