Comments (48)
We have to bundle portable versions of the dependencies like PostgreSQL, Redis, Nginx and Node.js with it.
No no, don't do this. Or at least make it optional. Instead just let users point the code at their own Postgres, Redis, etc. and document how to configure the web server. I'm also interested in a Docker-free install, and while a big part of that is that I don't like Docker's security problems, another part of it is that operationally I want to be running one Postgres database, not a different Postgres database for every app that uses Postgres.
from librephotos.
also interested in a docker free install.
from librephotos.
Okay, adding in the bits to create the account has it working properly. I'm going to feed it some photos and see if everything appears to be correct. If it does, I'll dump what I've done in another comment
from librephotos.
I am on the noober side of things, but I tried to do the linux install.
It crashed when nginx tried to bind where Apache lived. I wish I knew that this auto install was going to throw nginx in there. It isn't mentioned in the README. I hope I didn't bork my system but I just uninstalled nginx and deleted all the librephotos files.
I will return on a later release. Excited to try it out as a Google Photos replacement.
Thanks
from librephotos.
Matrix is better at bridging things than IRC/Discord :)
from librephotos.
from librephotos.
@foobazbar123 Talking specifically about the /usr/bin/bash
issue, /bin
is just a symlink to /usr/bin
on most modern distros. It's called the /usr merge. According to https://wiki.debian.org/UsrMerge it is the default on new installations but the change has to be applied manually to existing ones. It is weird to call the command in /usr
directly though, the symlinks are there to preserve compatibility and not using it will break your script on some systems as you found out.
from librephotos.
yes but maybe that the best way is use
/usr/bin/env bash
I will check compatibility with ubuntu 20.04 and take into account some input
from librephotos.
@foobazbar123 thank you for your test
I will take suggestions in the next version
@derneuere Please can you merge LibrePhotos/librephotos-linux#2 after this test?
from librephotos.
@foobazbar123 Thanks for the test!
@tomamplius I merged it :)
from librephotos.
maybe we can remove node server, right
from librephotos.
@strugee I haven't tried it but the docker-compose file has variables that you can change for the Postgres host, port, user, password, and database name. I don't think anything is stopping you from using an existing shared postgres in a container or not in docker at all. You just need network connectivity.
from librephotos.
Yeah, I saw that too. I'm manually deployed several Python apps before so I think I should be able to figure it out, but I need some hints as to what exactly needs to be deployed and where the code for those components is. There's the backend, the proxy, and the frontend right?
If someone gives me a quick overview of how you'd do it I can figure out the details and write up some install instructions.
(To clarify: I also don't like Docker for other reasons. Primarily the fact that many images are chock-full of security vulnerabilities and there's no good/non-hacky way to deal with that unless you're a company and have an entire team dedicated to keeping images up-to-date.)
from librephotos.
@strugee You can find the frontend , backend and proxy here.
You can find the relevant backend settings here, I think the relevant file for the frontend are here, here, but I am not sure about the last one. Never worked on the proxy, if you have any concrete questions I can route them to @sim4city. He worked on it for a couple of commits.
from librephotos.
@strugee You can find the frontend , backend and proxy here.
You can find the relevant backend settings here, I think the relevant file for the frontend are here, here, but I am not sure about the last one. Never worked on the proxy, if you have any concrete questions I can route them to @sim4city. He worked on it for a couple of commits.
I'd agree that not building things shouldn't be done for a Docker deployment. That's the Docker way, after all :) There's no need to do so for VM or LXD style deployment and it would just create more overhead for you guys, for little real benefit.
I'm going through some of the files you linked to in your post, specifically the NGINX parts at the moment. I presume "backend" is a name that would resolve in the Docker environment to a particular container and "frontend" as well?
Based on that, is it correct to say that the backend process then listens on port 80, expecting http traffic and the frontend process listens on port 3000 by default? Is it expected that external clients, web users, are to be passed into the backend on the api and media end points?
I ask this as it would be nice to break the current dependency on nginx so a person could use caddy or whatever if they wanted. Shouldn't be hard to come up with an example caddy config based on what I'm seeing at the moment :)
@strugee I just wrote all I said above and then really read your comment. Looks like "proxy" is just NGINX in this case and nothing fancy, which makes things easier. @derneuere's post contains the bits for the front end dependencies, so I'm going to try and get that deployed today into an LXD container.
from librephotos.
Well, I have it up and running. Only thing is, the initial user isn't created so I can't login and test anything. Is there any way to force the creation of the user? I've got the ADMIN_USERNAME and ADMIN_PASSWORD environment variables set, but nothing is created. Thoughts?
from librephotos.
The admin user is created in the entrypoint script: https://github.com/LibrePhotos/librephotos/blob/dev/entrypoint.sh
You could change it to force the creation of an admin acount.
from librephotos.
Ah, I see what I did wrong. I figured the migrations were doing that and totally over looked the bottom part there with manage.py shell part :)
from librephotos.
It's running, mostly. There are various issues resulting from, I believe, the "proxy" usage of NGINX. Is there expected to be multiple nginx things running in various directions? There's an nginx conf for the frontend, backend and the "proxy". Am I correct in thinking that with the current design three nginx instances are required?
from librephotos.
AFAIK it is only one Nginx instance. The conf is here
I am pretty sure the other nginx.conf in the other repositories are not used.
@sim4city do you know if the other nginx.conf are used?
from librephotos.
@foobazbar123 just skimmed through your comments on my phone - I'll probably hop on a computer in an hour or two and try setting things up too. Let's chat? I just created the #librephotos
IRC channel on Freenode if that works for you
from librephotos.
Oh, I forgot there was a Discord server... we could do that too although honestly because Discord does not respect my privacy or freedom it would be great to avoid it. I wonder how difficult it is to bridge Discord and IRC - I'll file a separate GitHub issue for that so we don't clutter this one up.
from librephotos.
I have it fully working, so far as I can tell, now. I've got some working.. er.. instructions, if they can be called such, that will take one from a more or less blank LXD instance (with a couple of PPAs for Postgres and Node) to "working system"
It appears to one degree or another at least two nginx instances are probably desired, and possibly all three, in the Docker config. Consolidating the settings into one is possible in the LXD environment so I just did that. Prior to doing so, thumbnails and such wouldn't work
from librephotos.
I am also interested in doing this. I've read over the Makefiles and it seems pretty simple to build, however it would help me out immensely if you'd consider adding:
- Releases/tags consistent across the various component repos
- Combine everything into one repo (simplify the build process)
For sure until 1 is done, I don't think it's feasible to do this--there is no way to figure out what commits match.
from librephotos.
Would be great if you want to tinker with it a bit 👍
If you want to build a binary you should look at the dockerfile. The makefile only creates a docker image.
- The latest dev commits are always compatible with each other.
- I don't think that we will merge the repos. Concerns should be separated to allow for greater modularity. It also should not be that hard to do it in a makefile. Git clone the repos in the makefile, and you will have all the code in one place.
from librephotos.
You can now install librephotos locally under debian11: https://github.com/LibrePhotos/librephotos-linux
from librephotos.
@foobazbar123 thanks for you test. It was only test on debian 11 before.
You can find a pull request to Ubuntu 20.04 LibrePhotos/librephotos-linux#2
If you can test and validate the new package from https://github.com/tomamplius/librephotos-linux/archive/ubuntu20.04.zip
About nodejs and npm are exclusive. Can you give me more information. I can't reproduce
from librephotos.
I do have the NodeSource repository on my LXD test container, so that may be a local issue on my part.
This is indeed a local issue. NodeSource ships npm inside their nodejs package, but the nodejs package in the Debian/Ubuntu archives separates it out into the npm package.
from librephotos.
OK i understand.
from librephotos.
from librephotos.
from librephotos.
check the branch ubuntu20.04
I'ts not commit
https://github.com/tomamplius/librephotos-linux/tree/ubuntu20.04
from librephotos.
from librephotos.
from librephotos.
added on readme /usr/lib/librephotos/bin/librephotos-upgrade
from librephotos.
from librephotos.
from librephotos.
I tried to set up Caddy and posted LibrePhotos/librephotos-linux#8 but I can't quite get it to work. Not really my skillset.
from librephotos.
What's the reasoning for not serving the UI from the backend? Why have a dependency on a proxy?
from librephotos.
dependency become optional on the next version https://github.com/tomamplius/librephotos-linux/tree/v2
from librephotos.
Sorry, that's not quite what I'm looking for. Why can't the backend serve these files directly instead of having another daemon serve them?
from librephotos.
I mean it's choice because webserver like nginx apache are more perform than django to server files.
from librephotos.
The way it currently works, the frontend is built everytime time it's restarted and served from node/express. Instead, it could be built once and served as static files from django.
NGINX/Apache don't serve these files directly, they proxy to the node server. You could setup caching for either situation to have them serve the files from cache, but I highly doubt there's any kind of performance impact serving files from django for 99% of librephoto setups.
from librephotos.
Location /protected_media /original /nextcloud_original are not used? i have not currently check this part.
https://github.com/tomamplius/librephotos-linux/blob/v2/ressources/nginx/nginx.conf
from librephotos.
and /media /api are proxy to the backend not ton node server
from librephotos.
Disregard, I incorrectly assumed django can share files.
I created an Ansible task that does most of your script (you'll need to manually setup the nginx bit): https://gist.github.com/thequailman/caffade8049ccbee64113c77f42b9bbe#file-librephotos-md
I could probably clean this up and make it into a real ansible collection if anyone wanted that.
from librephotos.
I don't know / use ansible. but it's a idea to add to add your script on official repo.
@derneuere can you i add the script in librephotos-linux? or you want create librephoto-ansible?
@thequailman
tkx and great work.
from librephotos.
i am on the noober side of things, but i would gracefully appreciate that we concentrate on bugfix rather than starting new projects lol
from librephotos.
Related Issues (20)
- Image viewer full screen option, same as video player
- "similar images" not clickable HOT 1
- Return if photo was uploaded but not yet processed HOT 13
- Database Initialization Fails on Unraid with Docker Compose HOT 2
- Docker - On first boot LibrePhotos does not load setup | Cannot sign in at logon screen HOT 6
- Streamline dedup process as part of the photo scan HOT 4
- Map places markers in wrong locations HOT 7
- External Authentification Openid Connect
- Delete from trash after n days
- Faces tagging in Firefox: Detail: Invalid Page when tagging faces
- Add release/environment details to Admin page for easy bug reporting HOT 1
- The "Scan Photos" task in my LibrePhotos installation does not complete and appears to hang indefinitely. HOT 4
- Title: Feature Request: Duplicate File Detection and Deletion
- Crash when requesting summary of hidden photo HOT 1
- Adding ETag support for /api/albums/date/list/ endpoints HOT 2
- German Tags
- Feature Request: Search Functionality for Images by Camera Model (ILCE-6400)
- "Large Language Model" always downloaded
- Add search fields for person name and file path back
- torch causes Fatal Python error: Floating point exception HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from librephotos.