Commit Graph

74 Commits

Author SHA1 Message Date
Kostiantyn
a8edb30ae4 Refactor Docker build workflows (#1221)
* Initial implementation

* Multiple fixes and improvemens

* Better `curl` retries timing

* Remove unused `TARGETOS` and `TARGETVARIANT` vars; add the version fetch fallback code to the build scripts

* Move the fallback code before the var usage

* Use double braces to make the code compatible with the `set -u`

---------

Co-authored-by: Konstantin Koval
2025-06-26 11:58:50 +03:00
Googol Lee
535f8e57fd Use Magickwand to handle images. (#1212)
* Add MagickWand perf test.

* Use MagickWand.

* Calculate the right thumbnail dimension.

* Remove magick bin file.

* Add building dependencies.

* Build images.

* Add --no-install-recommends

* Remove unused field.

* Fix typo

* Use uint in the worker.

* Add guard

* Always update apt.

* Fix EncodeJpeg() with the quality

* Rename the local error with a better name.

* Add worker.Terminate()

* Fix typo

* Rebase with master and rollback the build workflow.
2025-06-03 22:04:03 +02:00
Googol Lee
8872ea1df3 Include MagicWand library in the dependency image. (#1209)
* Include MagicWand library.

* Remove duplication.

* Limit dynamic libraries in the release build.

* Use cp -a instead of -r.

* Use bash instead of sh.
2025-05-23 11:27:07 +02:00
Googol Lee
06acd165f2 Bump golang from 1.23-bookworm to 1.24-bookworm, as well as gqlgen. (#1172)
* Bump golang from 1.23-bookworm to 1.24-bookworm

Bumps golang from 1.23-bookworm to 1.24-bookworm.

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update to use `go tool`, see https://go.dev/doc/go1.24#go-command.

* Update go.mod to go 1.24

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-17 18:45:30 +01:00
Kostiantyn
0fb6636ead Switch all images to the new registry (#1109)
* Switch all images to the new registry

* Update compose files

* Update Readme

* Fix several merge issues.

---------

Co-authored-by: Konstantin Koval
2024-11-03 08:42:37 +02:00
Googol Lee
7b69f247d3 Fix gqlgen (#1105) 2024-11-02 17:05:29 +01:00
Googol Lee
4303b71311 Use hardware acceleration when converting videos. (#1056) 2024-10-11 22:27:56 +02:00
Kostiantyn
ff009a6ae6 Set $NODE_ENV according to the image purpose during Docker build (#1088)
* Set $NODE_ENV according to the image purpose during Docker build

* Move `husky` from dev-deps to prod-deps, as it is used during prod `npm ci`

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-10-04 11:20:49 +02:00
Googol Lee
f861c97b49 Include all heif plugins in one so file. 2024-09-30 19:53:17 +02:00
Kostiantyn
d1193c5ca4 Refactoring part 1: Fix some annoying linter warnings in API code (#1064)
* names, constants of reusable strings, removed unneeded `if`, replaced deprecated imports

* more deprecated imports replaced

* What is this?))

* Fix a path and quote a var in Dockerfile

* Addressing review comments

---------

Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-09-30 14:45:02 +02:00
Googol Lee
340c181442 Use self-building dependencies and update the code with imagemagick. (#1053) 2024-09-17 15:02:23 +02:00
Googol Lee
0ffa7e05fa Bump to golang 1.23 (#1046) 2024-09-06 17:43:19 +02:00
Googol Lee
a6cbfc76f3 Back to bookworm. (#1040) 2024-09-06 13:32:22 +02:00
Googol Lee
85c1e52b06 Use alpine as base images. (#1033) 2024-09-02 18:35:45 +02:00
Googol Lee
ad13172a32 Switch to Debian testing and imagemagick. (#1021) 2024-08-29 10:30:06 +02:00
Googol Lee
6c5c304492 Fix the default value of BUILD_DATE. (#1027) 2024-08-29 09:01:42 +02:00
Googol Lee
bb66a8b791 Fix release version and date in UI. (#1025) 2024-08-27 21:46:29 +02:00
Googol Lee
ebcbe6c057 Update workflow using Dockerfile. (#1003) 2024-08-03 23:17:54 +02:00
Googol Lee
bdae9a67ce Add Set up Docker development environment in README.md (#997) 2024-07-23 21:56:30 +02:00
Googol Lee
0345bc1481 Update Set up development environment in README.md. (#995) 2024-07-16 23:10:38 +02:00
Googol Lee
365328457e Building scripts for apt/homebrew platforms. (#993) 2024-07-09 12:34:55 +02:00
Googol Lee
e36b09753a Bump go version and modules. (#976)
* Bump go version to 1.22. Bump all go module to the newest version, except pinning libheif@v1.15.1 to match the c lib version in Debian bookworm.

* Update go_wrapper.sh to fit golang image.

* Update the way to set go envs.

* Test against go 1.22

* Set default shell for all building stage in Dockerfile.
2024-06-28 10:10:18 +03:00
Kostiantyn
f79d379e38 Urgent small fixes in the Dockerfile and Compose configs (#972)
* Freeze UID and GID for the `photoview` user inside the image; added alternative permission configs description to the Readme and Makefile (as a comment); switched the default tag in the compose from `2` to `master`, as this is the most common user misunderstanding according to the issues and Discord questions

* Revert back to the tag `2` with the assumption of the release happening soon

---------

Co-authored-by: Konstantin Koval
2024-06-23 14:28:02 +02:00
Kostiantyn
6693920b61 Configure shell to fail if any part of piped command chain fails. Fix Hadolint issue DL4006 (#947)
Co-authored-by: Konstantin Koval <kkb@ukr.net>
2024-05-31 09:34:46 +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
0a73484474 Attempt to fix Docker again 2022-07-08 17:56:52 +02:00
viktorstrate
214aa389fb Fix Docker builds 2022-07-08 16:49:46 +02:00
viktorstrate
793e868d6f Fix #646 2022-02-08 13:05:40 +01:00
viktorstrate
bdef67fffc Update debian version in Dockerfile
- This fixes build errors
- This fixes #582
2021-11-11 19:55:44 +01:00
viktorstrate
ffce49e191 Fix docker healthcheck 2021-10-02 16:50:24 +02:00
Lucy Cifferello
e061d0db4e fix docker build 2021-09-30 15:43:22 -06:00
Lucy C
78342f3095 Update Dockerfile
remove unnecessary quote
2021-09-30 15:03:37 -06:00
Lucy C
d04f281321 Update Dockerfile
Adjust health check with exit code
2021-09-30 15:02:51 -06:00
Lucy C
cae5d5ce3d Update Dockerfile
add healthcheck instruction
2021-09-30 14:56:44 -06:00
Lucy C
36ba23c475 Update Dockerfile
Persist `curl` as a dependency, mainly for upstream service availability health checks.
2021-09-30 14:08:52 -06:00
viktorstrate
088544fa06 Fix version undefined 2021-08-30 12:22:12 +02:00
viktorstrate
029a5678a6 Fix Docker builds 2021-07-15 17:43:07 +02:00
Robin Moser
b8eeb24586 display link to the last commit 2021-04-20 18:21:41 +02:00
Robin Moser
7afab98ab0 add version and build info to the settings page 2021-04-20 15:58:22 +02:00
viktorstrate
a881e0c9df Update node version in build process 2021-04-05 23:18:38 +02:00
viktorstrate
0a5e6bf350 Update Husky hooks 2021-04-03 17:32:01 +02:00
Viktor Strate Kløvedal
c0bced8c0a Merge pull request #258 from Kjeldgaard/244_exiftool
Use exiftool for parsing exif data
2021-04-02 23:03:26 +02:00
viktorstrate
ef063df34d Fix Docker builds for arm 2021-03-31 23:32:37 +02:00
Viktor Strate Kløvedal
454b2dbadd Merge branch 'master' into 244_exiftool 2021-03-29 12:10:02 +02:00
viktorstrate
b59ba20bd1 Refactor Dockerfile
- Use debian:bullseye instad for newer packages
- Only install necessary dependencies for targeted arch
- Make it work with libheif
2021-03-28 13:57:57 +02:00
viktorstrate
a039941dda Add libheif to Dockerfile 2021-03-27 22:30:26 +01:00
Kjeldgaard
1f9f6ebf9a Use exiftool for parsing exif data
Use exiftool to parse exif metadata.

Signed-off-by: Kjeldgaard <Kjeldgaard@users.noreply.github.com>
2021-03-20 00:26:05 +01:00
viktorstrate
c18759e6db Fix darktable docker install
and print version of executable workers on startup
2021-03-03 13:32:44 +01:00
viktorstrate
cc3f8a3aa4 In Dockerfile, use official PPA for Darktable to get the latest version
This solves #205
2021-03-02 16:21:47 +01:00
viktorstrate
b66cbf9274 Add environment variable to specify custom UI path
When using SERVE_UI=1
2021-02-26 15:10:28 +01:00