Skip to content

Jeffersonktw/camera-trap-server

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CameraTrap 2021

  • docker-compose.yml: yml file for development
  • docker-compose-initdb.yml: yml file for development (start from xxx.sql.gz dump file)
  • production.yml yml file for for production
  • Makefile for command shortcuts

Development

Frontend (Search page)

folder: frontend-search

$ cd frontend-search

Setting Environment

.env for local development

.env.prod for production build

local development setting:

MY_ENV=dev
API_URL=http://127.0.0.1:8000/api/

Install packages

$ yarn install

Run for development

$ yarn start

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 24.8%
  • Python 19.4%
  • CSS 18.7%
  • SCSS 13.1%
  • Less 12.6%
  • HTML 11.1%
  • Other 0.3%