Guest Join UsHey Guest,
Welcome, Join our awesome community where you can discuss on various topics :-
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Some point about your community
Much More.. or Create an Account


I am super Awesome Announcement, with links and can be used to announce important things. Check here
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Request: Phlex/Flex TV
#1
Hello there!

I'm the developer of a PHP web application called "Phlex", or "Flex TV" on Google Actions.

Phlex is written in PHP, and servers as a bridge between Google Assistant and/or Alexa devices(WIP).  

I had previously worked on a project called Muximux, so I was familiar with LS.io's awesome containers for all the things Docker...but I'm not super-familiar with Docker myself.  Either way, mostly out of curiosity, and partially out of demand, I fudged my way through getting a working container going, although it was lacking in features and just sorta "worked".

Recently, I did *something* that renders the container completely inoperable.  I tried fixing it, or at least what I thought could possibly fix it, but I'm having no success, and honestly, I never really wanted to be the keeper of a Docker container in addition to Phlex...it's just a ton of work.

So, I thought I'd pop over and humbly ask for help.  Currently, my hacked-together image(s) are here:

https://github.com/d8ahazard/docker-phlex

And my main app code is here:

github.com/d8ahazard/Phlex

In the /beta branch of the docker image, you can see what I was trying to achieve, which is to pull the source of /d8ahazard/Phlex into the /www folder, bind the output of the apache logs to stdout, and hopefully, also bind the output of /www/logs/Phlex.log and /www/logs/Phlex_error.log in a similar fashion.  

I had ideally wanted to set ports 5556 and 5557 to be for HTTP and HTTPS, respectively.  

Additionally, I'm talking over MDNS to control and query Cast devices, so I had found some readme or another project somewhere that had the NGINX bindings to port 9000.  This all worked as well up until a few days ago.  

To make it more fun, I wanted to set an environment variable that would let users customize what ports to listen on for HTTP, HTTPS, and MDNS...

Now, when I try to access the page for my site, I get a whole bunch of 301 805 messages in the nginx access log, and no page "too many redirects".  

So again, I'd never really intended to be the keeper of a Docker image.  I think Docker is fun, and so I got it working for a time, but now I'm a bit frustrated, and I'd just like to know what I'm doing wrong - as well as see if the good folks over here would like to build a proper image of my project.   Angel

It'd be greatly appreciated.  Let me know if I've left anything out.  Big Grin
Reply
#2
Hello, this project is really interesting. Can someone help her?
Reply
#3
(20-07-2017, 11:35 PM)digitalhigh Wrote: Hello there!

I'm the developer of a PHP web application called "Phlex", or "Flex TV" on Google Actions.

Phlex is written in PHP, and servers as a bridge between Google Assistant and/or Alexa devices(WIP).  

I had previously worked on a project called Muximux, so I was familiar with LS.io's awesome containers for all the things Docker...but I'm not super-familiar with Docker myself.  Either way, mostly out of curiosity, and partially out of demand, I fudged my way through getting a working container going, although it was lacking in features and just sorta "worked".

Recently, I did *something* that renders the container completely inoperable.  I tried fixing it, or at least what I thought could possibly fix it, but I'm having no success, and honestly, I never really wanted to be the keeper of a Docker container in addition to Phlex...it's just a ton of work.

So, I thought I'd pop over and humbly ask for help.  Currently, my hacked-together image(s) are here:

https://github.com/d8ahazard/docker-phlex

And my main app code is here:

github.com/d8ahazard/Phlex

In the /beta branch of the docker image, you can see what I was trying to achieve, which is to pull the source of /d8ahazard/Phlex into the /www folder, bind the output of the apache logs to stdout, and hopefully, also bind the output of /www/logs/Phlex.log and /www/logs/Phlex_error.log in a similar fashion.  

I had ideally wanted to set ports 5556 and 5557 to be for HTTP and HTTPS, respectively.  

Additionally, I'm talking over MDNS to control and query Cast devices, so I had found some readme or another project somewhere that had the NGINX bindings to port 9000.  This all worked as well up until a few days ago.  

To make it more fun, I wanted to set an environment variable that would let users customize what ports to listen on for HTTP, HTTPS, and MDNS...

Now, when I try to access the page for my site, I get a whole bunch of 301 805 messages in the nginx access log, and no page "too many redirects".  

So again, I'd never really intended to be the keeper of a Docker image.  I think Docker is fun, and so I got it working for a time, but now I'm a bit frustrated, and I'd just like to know what I'm doing wrong - as well as see if the good folks over here would like to build a proper image of my project.   Angel

It'd be greatly appreciated.  Let me know if I've left anything out.  Big Grin

Hope you manage to find some help so that Synology NAS docker setup of your amazing work can be achieved Smile
Reply
#4
I'm into home automation. I'm currently using homeseer with alexa and harmony integrated.

I'll take a look at this app and see if I can help with the docker image
Reply
#5
@digitalhigh I gotta admit, this is pretty cool.

I fired up a local test container (with minor changes I made here: https://github.com/d8ahazard/docker-phle...lca:master )

It detected the plex server and the clients right away. By typing commands on the web, I can control the plex media player running on Win10 really well. When controlling the web player in chrome, I can start playback, but cannot pause or stop (maybe a limitation of the web player, not sure).

What is the issue you're having with it? Perhaps /config/updated related? Because as is, when the container is recreated, the "updated" file will remain in that location but the firewall rules won't be in the container anymore. In my fork, I moved it into the container so if the container is recreated or updated, the file will be missing and the firewall rules will be set again.

PS. Do you have a beta link you can pm me for the alexa integration? I don't have google home, but do have some echos I'd like to test

EDIT: I see that you're trying to convert it to run on apache. I'm afraid none of the lsio guys are really fans of apache, hence our apache image being really outdated. I hope you stick with nginx
Reply
#6
The main issue I had with it was that I had to use host network mode for Chromecast discovery but it tries to bind to port 9000 for php and I'm currently using port 9000 for other stuff.

So, the ports need to be configurable in some way without having to go into the container and mess with the php configuration files. Preferably, the port for Phlex itself could also be configurable.

Just as an aside note, I messed around with porting the whole thing to a standalone python Flask app to remove the need for a separate web server and php, which also makes it trivial to change the port (and in my opinion python is a lot easier to work with than php). I had a decent amount working but it's unlikely I'll have time to finish it anytime soon.
Reply
#7
(07-08-2017, 08:12 PM)aptalca Wrote: @digitalhigh I gotta admit, this is pretty cool.

I fired up a local test container (with minor changes I made here: https://github.com/d8ahazard/docker-phle...lca:master )

It detected the plex server and the clients right away. By typing commands on the web, I can control the plex media player running on Win10 really well. When controlling the web player in chrome, I can start playback, but cannot pause or stop (maybe a limitation of the web player, not sure).

What is the issue you're having with it? Perhaps /config/updated related? Because as is, when the container is recreated, the "updated" file will remain in that location but the firewall rules won't be in the container anymore. In my fork, I moved it into the container so if the container is recreated or updated, the file will be missing and the firewall rules will be set again.

PS. Do you have a beta link you can pm me for the alexa integration? I don't have google home, but do have some echos I'd like to test

EDIT: I see that you're trying to convert it to run on apache. I'm afraid none of the lsio guys are really fans of apache, hence our apache image being really outdated. I hope you stick with nginx

In a nutshell - I run it on Docker Synology, and it just stopped working.  99% sure it's a dependency issue or something I changed, but I cannot for the life of me find a log or error message *anywhere* that clues me in to what I've messed up, and I've done a lot of bug hunting in my day.  

The switch to Apache was solely for familiarity, as I distribute it on XAMPP for non-docker users, and trying to debug my way back to "Here, this is exactly like what I'm running on a linux test box.".  Also, mildly for educational purposes.  "How do they build these things?".  

Largely, I'm asking for the help because I'm not a docker expert, and I've got my hands full between developing Phlex and supporting Muximux, another php webapp I dove into a while ago.  I made the image I have by copying the LSIO image for Muximux and modifying it till it worked (with pointers from people who know linux better than me).  Then it broke again.  

In a perfect world, I'd have the configs linked to a dir for access, logs piped to sdout for ease of viewing, and environment vars set up to specify time zone right to PHP, and settings for the ports for the server to run on, as well as 9000, which it uses for the MDNS stuff.  

And the MDNS stuff itself is a PITA.  I didn't write it, so PHP+sockets is mildly alien to me.  The way we have it working now seems hacky, that you need SU permissions to modify the network params to make it bind correctly.  I'm guessing someone who knows docker better would know a better and correct way to do it without requiring SU or binding to host.  

I'm sure there are other things that could be done better as well.


d8ahazard@gmail.com - HMU on email or hangouts.  I haven't messed with Alexa stuff in a few weeks, but we can chat about it.
(10-08-2017, 02:38 AM)syntax21 Wrote: The main issue I had with it was that I had to use host network mode for Chromecast discovery but it tries to bind to port 9000 for php and I'm currently using port 9000 for other stuff.

So, the ports need to be configurable in some way without having to go into the container and mess with the php configuration files. Preferably, the port for Phlex itself could also be configurable.

Just as an aside note, I messed around with porting the whole thing to a standalone python Flask app to remove the need for a separate web server and php, which also makes it trivial to change the port (and in my opinion python is a lot easier to work with than php). I had a decent amount working but it's unlikely I'll have time to finish it anytime soon.

Wait, what?  Could this be redistributed without Docker in a non-trival way to alll platforms???  It's really the holy grail I've been searching for.  In a perfect world, I would port all of this to run as a Plex addon, which would eliminate a buttload of other constraints.  But, I don't know python, and trying to move this behemoth as my first project seems like a bad time.  But, if you know py, we should definitely talk.  

d8ahazard@gmail.com - HMU on email or hangouts.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)

About LinuxServer.io

Focus MyBB Theme is designed for MyBB 1.8 series and is tested properly till the most current version of MyBB i.e. 1.8.9. It is simple, clean and light MyBB theme with use of font-awesome icons and shrinking header.

For any more information, please use our contact form.

              Quick Links

              User Links

              Advertise