Closed pisua closed 5 years ago
Good morning!
You don't seem to have any kind of reverse proxy (nginx or Apache) container used to serve the Movim application. The Movim container requires a FastCGI compatiable webserver to act as a proxy, it also needs to be able to see the static content (bind mount works). See the following example;
services:
movim:
image: movim/movim:latest
volumes:
- ${PWD}/movim:/var/www/html:rw
nginx:
image: nginx:mainline-alpine
ports:
- published: 80
target: 80
volumes:
- ${PWD}/nginx:/etc/nginx/conf.d:ro
- ${PWD}/movim:/var/www/html:ro
version: '3.7'
I've removed any environment
keys from the YAML to keep it simple. You need an nginx container which you can mount configuration into, here is example nginx configuration to use.
Hi, i understand that we need a frontal http to have a working movim container. So it seems it's not an autonomous container. Why do you don't provide a version ready to use with already a http server inside the container ? it should be better to have an nginx or apache2 with the correct configuration inside this container and a port expose. Regarding other official container like phpmyadmin or pgAdmin or jenkins, we don't have set an http container to have a working interface.
Anyway , i've created a httpd apache2 container from the official docker hub repo and shared a volume between movim and apache2 container.
Can you give me a configuration for apache2 with all needed module to ensure everything is ready and working ?
For my point of view i use a http container (nginx or httpd) to restrict access to application in http and use only proxypass.
Thanks in advance for you answer. Regards, Aurélien PISU
It's generally considered bad practice to run more than a single service per Docker container. One of the perks of Docker is process isolation. Unfortunately I am not familiar with Apache2 at all, I only use nginx personally so perhaps @edhelas can provide some example configuration?
In the future, when NGINX Unit is more mature, I may create a prototype movim-unit
container for testing, but currently this is how it works. It makes it infinitely easier to maintain for me.
Hi, i understand your concern about havin a single service per container. That what majority kind of container provides and it's a the best pratice. We can give as an example nextcloud or owncloud for instance.
But in the major cases the server is available and work without having to set a front httpd server with the correct configuration.
if you can provide a movim-unit that provides an interface and a ready to use container it would be better.
Regarding my understand it seems the dependencies between the 2 container nginx (or httpd) and movim seems very high. I understand it's how it works today but with apache2, we can't deploy our own movim due to lack of documentation. @edhelas, if you can provides some example, that would be nice. Thanks in advance for your answer Aurélien PISU
@pisua When you launch the daemon manually it generates a configuration for Apache and nginx, an example is available on the official documentation there https://github.com/movim/movim/wiki/Install-Movim#4-configure-your-web-server .
The rest is simply to point the subdomain or directory to the Movim root repository. Furthermore you have an example for Apache there. https://github.com/movim/movim/blob/master/etc/apache2/conf-available/movim.conf
Hi, i've tested with a apache2 that includes php7 and set on our virtualhost the configuration based on your example : I ensure that the necessary modules are loaded and i get a 200 http status that contains this error message : An error occured, check syslog for more information
Can you give me more info to understand where is the issue ?
here the configuration used : <VirtualHost *:80> ProxyPass /movim/ws/ ws://movim:8080/ Alias /movim/ /var/www/html/
<Directory /var/www/html> DirectoryIndex index.php Options +FollowSymLinks -Indexes AllowOverride FileInfo Options Require all granted
<Location /movim/> Header set Access-Control-Allow-Origin "*"
Can you please check syslog for more information? :)
Where can i find it ? Do i have to look on the movim container or apache ?
Thanks in advance for you answer Aurélien
You probably want to tail the Movim container logs, to see what PHP-FPM is outputting when you hit the page.
@pisua it seems that you need more help about packaging/deploying your own Docker Movim instance.
This bug-tracker is more there to list and fix issues related to the current movim_docker file. I think that it's better for you to come to our chatroom to discuss about those issues: xmpp:movim@conference.movim.eu?join
If you're ok with that I'll close this ticket and we continue the discussion there.
Hi, we try deploy without docker compose a full docker environment using these command for deploying our own movim pod for our company.
-> create a docker network docker network create --subnet=172.20.0.0/16 my-net
-> create postgres container docker create --restart=always --name postgres -p 5432:5432 \ -e POSTGRES_USER=root -e POSTGRES_PASSWORD=movim \ -v /var/volumes/postgres/:/var/lib/postgresql/data \ -e POSTGRES_DB=movim --net my-net postgres
-> create pgADmin container to acces to the databse using http docker create --restart=always --name pgAdmin -p 8000:80 \ -e "PGADMIN_DEFAULT_EMAIL=macha.jumelin@cohorte-technologies.com" \ -e "PGADMIN_DEFAULT_PASSWORD=postgres" \ --net my-net \ dpage/pgadmin4
->create xmpp openfire container docker create --name xmpp --restart=always \ -p 9090:9090 -p 5222:5222 -p 7777:7777 \ -v /var/volumes/openfire/:/var/lib/openfire/ \ --net my-net gizmotronic/openfire
->create movim container docker create --name movim --net my-net --restart=always \ -e POSTGRES_DB=movim -e POSTGRES_HOST=postgres \ -e POSTGRES_PORT=5432 -e POSTGRES_USER=root \ -e POSTGRES_PASSWORD=movim -e MOVIM_ADMIN=movim \ -e MOVIM_PASSWORD=movim -e MOVIM_DOMAIN=http://localhost/ \ -p 8080:8080 -e MOVIM_PORT=8080 -e MOVIMINTERFACE=0.0.0.0 \ movim/movim:0.14.1rc4
after running all these container
i'm able to connect to my postgres database movim , my xmpp server openfire. But i can't connect to any administrative web interface for movim in order to set the xmpp server to use as well as i can't connect to movim using the Mac OS client .
For the movim container Do you have any documentation about how to create a movim container properly ? is there any missing environment variable in my docker create container ? How to define in the movim container the link to the xmpp container ? Is there any web technical interface to configure it using the browser ?
Thanks in advance for you quick answer
Cohorte technologies.