Commit Graph

29 Commits

Author SHA1 Message Date
Googol Lee
50209bc55c Fix the coverage for codecov. (#1251) 2025-07-18 15:21:03 +02:00
Googol Lee
0da8bef69e Update log for passing attrs with context. (#1216)
* Update log for passing attrs with context.

* Check type-casting

* add tests.

* Use t.Cleanup() to restore the global value.

* Fix error.

* Update tests.

* Add comments.

* Remove cover.cov

* Update doc.

* Update git ignore.
2025-06-07 17:11:50 +02:00
Kostiantyn
6c020cc1f9 Enhance Codecov integration (#1136)
* Define sub-projects and set coverage threshold for failure in the `codecov.yml`; make both test execution engines to generate also JUnit reports; upload these JUnit reports to Codecov for analysis

* Fix UI Vite config and add more details to the API is-generated-code script

* Add API JUnit report file to `.gitignore`

* Fix the copy issue by mounting the volume

* put the exact report name to the `docker cp` command

* Added `set -euxo pipeline` to the `test_api_coverage.sh` script; try to fix the missing report issue by setting immutable flag and report directoty

* Revert `chattr` and `set` commands, as they cause errors

* debug

* put the filename of the JUnit report to upload

* `set -euxo pipefail` in `scripts/test_api_coverage.sh`

---------

Co-authored-by: Konstantin Koval
2024-11-25 16:25:38 +02:00
Googol Lee
ebcbe6c057 Update workflow using Dockerfile. (#1003) 2024-08-03 23:17:54 +02:00
Googol Lee
0345bc1481 Update Set up development environment in README.md. (#995) 2024-07-16 23:10:38 +02:00
Kostiantyn
df9af39a16 Validate incoming GPS data (#951)
* Validate incoming GPS data and throw an error if it is incorrect, storing Null values

* Extracted GPS data processing to function in external parser; optimized IF in internal parser; removed unnecessary comments; set exact values for positive test

* Add the migration for removing existing invalid GPS data and its test; added better errors to asserts in the GPS validation test

* Install FFmpeg and ExifTool on the API unit-test environment

* Fix 'stripped.jpg', 'IncorrectGPS.jpg', and 'CorrectGPS.jpg' tests for the external parser

* Optimized data validation in the external parser, returned error by the internal parser for invalid data, updated test to expect errors and handle them

* Switched from error to log entry in case of incorrect GPS data, as error handling is not so transparent in the internal parser

---------

Co-authored-by: Konstantin Koval
2024-06-29 10:32:48 +03:00
Kostiantyn
df1610b13c change healthcheck command for MariaDB container (#963)
Co-authored-by: Konstantin Koval
2024-06-02 19:02:14 +01:00
Kostiantyn
0193f7703d Refactor docker deployment and user setup (#863)
* Fix #862, address #826 and maybe some other tickets: reimplemented the docker-compose user setup to enhance product setup experience and cover much more cases.

* make unique DB container name and use it in communication from Photoview

* Removed unnecessary healthcheck for photoview from docker-compose.example.yml, as it is defined in the Dockerfile; optimized Dockerfile combining all RUN directives of PROD stage into 1, which will produce single layer and save some space; added Dockerfile-dev, docker-compose-dev.yml, and new "dev" and "dev-down" directives into Makefile, which allows to setup development env in Docker. Instructions of how to use it are in comments at the beginning of Dockerfile-dev and docker-compose-dev.yml files

* Set RWX permissions to the application's working folder for any user, so that the image could be later run with non-root permissions and the app still be able to do needed operations in the FS

* Enhanced the "Getting started" section in the readme; added the `help` target and enhanced comments in the Makefile; commented out the `docker system prune -f` with the comment about the command and why it is there; added optional and commented by default `7zz` commands to the `backup` section of the Makefile

* Use `slim` base image for final photoview image

* Implement SQLite support according to the PR #851

* Removed deprecated `version` line from compose files; optimized dockerfile to build with less layers and run as non-root; mapped only Photoview related services to Watchtower by default instead of updating all running images on a host; added template for Postgres to the .env; reverted compose executable definition, so the new compose is called when present; added a tip about `lnav` to help

* fix a typo in the username; add support of PostgreSQL; split and optimize backup target in Makefile

* Fixed some typos and styling in Readme, excluded dev-environment setup from the PR; added a list of tips on how to secure Photoview in the Advanced setup section of Readme

* Implemented many security improvements, suggested by @Omar007, switched to the dedicated Darktable's repo to install the latest released version, as asked in #935; switched Watchtower to labels instead of profiles

* forgot the compose file

* move face models back to /app folder; comment out and document unnecessary vars in compose; fix a typo in a few vars

* Exclude Makefile in the root folder from git; documented multiple mounts case better; fixed incorrect SQLite DB path

* Fixed several bugs after complete testing cycle with all 3 DBs

* removed hardcoded port in Dockerfile

* Pin the major version for the `photoview` image for stability

* Revert back to the port 80 inside the container on product owner's request

* Provide a minimal compose file and update the readme accordingly

* Handle incorrect media file and folder permissions; set correct permissions for storage folder; fix healthcheck command for postgres

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-05-15 10:58:02 +02:00
viktorstrate
831e24f654 Fix API tests 2022-07-08 17:44:03 +02:00
viktorstrate
e7dbe0868d First working version of new timeline 2021-09-25 14:12:12 +02:00
viktorstrate
b022a13e55 Batch exiftool runs + scanner package restructuring 2021-05-06 22:01:48 +02:00
viktorstrate
a069eff0b2 Rewrite gallery to use reducer 2021-04-29 23:59:28 +02:00
viktorstrate
60f8a68bf6 Implement database integration tests 2021-04-23 15:10:23 +02:00
viktorstrate
f09ba14a0e Fix translations + fix build reload + more Typescript 2021-04-13 16:43:56 +02:00
viktorstrate
1ba45dbe09 Fix SQL errors for Timeline view,
when using Postgres or Sqlite. Closes #194
2021-02-14 10:11:10 +01:00
viktorstrate
107da91700 Refactor handling of environment variables 2021-01-17 16:50:48 +01:00
viktorstrate
41b122c461 Start on sqlite support
- TODO: Sqlite doesn't support MD5, all calls to this function should be done
  beforehand.
2021-01-10 18:59:01 +01:00
viktorstrate
335ee3ebe2 Cleanup ui files 2020-09-27 22:50:27 +02:00
Bruno Sousa
c64b4d0d39 make SetupDatabase returns an error and use PingContext with timeout 2020-04-15 16:18:51 +02:00
viktorstrate
39f68e4d8a Support PHOTO_CACHE env variable 2020-02-23 12:43:45 +01:00
viktorstrate
a2d0509cad Update scanner to delete removed files 2020-02-12 18:10:52 +01:00
viktorstrate
11896a246e Work on image processing 2020-02-02 18:18:38 +01:00
viktorstrate
3a730fea36 Update env files and move to postgres 2020-01-30 15:10:01 +01:00
viktorstrate
9c59e69a66 Move old api folder 2020-01-30 13:49:28 +01:00
viktorstrate
44e8a0481e Add docker-compose with proxy 2019-08-30 15:43:24 +02:00
viktorstrate
50bdc86ab0 Secure photos with header, rather than cookies. Now docker-compose works 2019-08-09 17:41:25 +02:00
viktorstrate
f0bf1c2dc4 Scanner work + image processing 2019-07-16 18:31:48 +02:00
viktorstrate
02e657328f Add semantic ui, refactoring 2019-07-07 23:53:07 +02:00
viktorstrate
d3f9ed8116 Work towards authentication 2019-07-05 00:36:32 +02:00