docker compose up
default config use compose.yml
and compose.override.yml
開發流程:
docker-compose up
default will use compose.yml & compose.override.yml
- fork repo from TaiBIF github to personal github account (first time)
- debug start from
devel
branch (github default branch) - create new branch
git co -b fix-xxx
git commit
git checkout devel
&git merge fix-xxx
,git push origin devel
- create Pull requests in github & merge to TaiBIF/devel
正式站就 merge to main branch
sync staging/production server database data:
- Delete or backup
.//ct22-volumes/pgdata
- Get dump gziped sql file from server
- put it in
initdb
folder - docker compose up
docker-compose -f compose.yml -f compose.staging.yml build / up
docker-compose -f compose.yml -f compose.prod.yml build / up
- DeploymentJournal: 相機行程
- DeploymentStat: 相機位置工作時數
script/import-deployment-stat.py
計算/匯入工作時數
Scripts:
- Nginx config: nginx-django.conf
- Docker config: production.yml
- Initialize let's encrypt: init-letsencrypt.sh
NOTES:
- Open port 443 on EC2
- Link nginx to django in docker config otherwise nginx cannot find correct upstream
- Make sure to check if data path & docker-compose yml filename in
init-letsencrypt.sh
are correct - When developinglocally by docker, https (provided by nginx) will not be available, so login through ORCID will fail.
gunicorn should add --limit-request-line 8190
, otherwise the search page download api may cause verbose querystring too long error