mondediefr / docker-flarum Goto Github PK
View Code? Open in Web Editor NEW:speech_balloon: :whale: Docker image of Flarum
Home Page: https://hub.docker.com/r/mondedie/flarum
License: MIT License
:speech_balloon: :whale: Docker image of Flarum
Home Page: https://hub.docker.com/r/mondedie/flarum
License: MIT License
https://github.com/flarum/core/blob/master/src/Http/Server.php#L48
Modify the server.php in the Http core for this kind of code so it can log to a file and not print out the username, database name, password, etc. I had to shell into docker and get help on this but we were able to find it in 30 minutes and I wrote the code in 2 minutes!
private function safelyBootAndGetHandler()
{
try {
return $this->site->bootApp()->getRequestHandler();
} catch (Throwable $e) {
error_log($this->formatBootException($e), 3, "/var/tmp/my-errors.log");
echo("Database is currently not available. See logs for more details.");
exit(1);
}
}
Hi, after filling the installation form, I got 504: Gateway timeout error
. The compose file I used is
version: '2'
services:
flarum:
image: mondedie/docker-flarum
container_name: flarum
labels:
- traefik.frontend.rule=Host:dell123.flarum
environment:
- FORUM_URL=http://dell123.flarum
- DB_PASS=123456
- DEBUG=true
volumes:
- flarum_assets:/flarum/app/assets
- flarum_extensions:/flarum/app/extensions
depends_on:
- flarum_mariadb
flarum_mariadb:
image: mariadb:10.1
container_name: flarum_mariadb
volumes:
- flarum_mariadb:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=123456
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=123456
Hello, I installed your container and after configuring the reverse proxy with nginx and SSL, after installing the forum, I ran into a problem
The forum homepage was blank with only the forums title, using Chrome developer console I saw this
'https://foro.lug.fi.uba.ar/' was loaded over HTTPS, but requested an insecure stylesheet 'http://foro.lug.fi.uba.ar/assets/forum-6c6cf9f4.css'. This request has been blocked; the content must be served over HTTPS.
After searching a little on Flarum own forum, I found that you have to change http for https on the config.php file
After changing http for https it works as it should.
The thing is that I explicitly definen a https FORUM_URL on the .env file for docker compose
It is supposed to put exactly that url on the config.php file?
response:(debug: true)
{"errors":[{"code":500,"title":"Internal server error"}]}
username and password is correct
dbdata(setting):
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| key | value |
+--------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| allow_post_editing | reply |
| allow_renaming | 10 |
| allow_sign_up | 1 |
| custom_less | |
| default_locale | en |
| default_route | /all |
| extensions_enabled | ["flarum-approval","flarum-bbcode","flarum-emoji","flarum-english","flarum-flags","flarum-likes","flarum-lock","flarum-markdown","flarum-mentions","flarum-sticky","flarum-subscriptions","flarum-suspend","flarum-tags"] |
| flarum-tags.max_primary_tags | 1 |
| flarum-tags.max_secondary_tags | 3 |
| flarum-tags.min_primary_tags | 1 |
| flarum-tags.min_secondary_tags | 0 |
| forum_description | |
| forum_title | ------- |
| mail_driver | smtp |
| mail_encryption | ssl |
| mail_from | [email protected] |
| mail_host | smtp.exmail.qq.com |
| mail_password | ---- |
| mail_port | 465 |
| mail_username | ---- |
| theme_colored_header | 0 |
| theme_dark_mode | 0 |
| theme_primary_color | #4D698E |
| theme_secondary_color | #4D698E |
| version | 0.1.0-beta.7.2 |
| welcome_message | This is beta software and you should not use it in production. |
| welcome_title | Welcome to ------ |
This forum is down for maintenance.
https://discuss.flarum.org/d/17496-flarum-0-1-0-beta-7-2-released/3
fix: need to access http://yourdomain.com/admin and enter the database password
There is a lot of things to do to be able to use this image from scratch :
docker-compose exec flarum sh
; remove line 12 in /nginx/sites-enabled/flarum.conf; wait for the chown to or reload nginx if allready started with kill -HUP 13
docker-compose exec mariadb mysql -pxxxxxxxx -e 'drop database flarum; create database flarum;'
You will then a 504 Gateway Time-out from nginx (flarum container), because php-fpm process doesn't end.
Whenever the docker container is started, every folder and file in /flarum is chown'ed to a special user created for running flarum (UID 991 by default). This is extremely slow, and if multiple extensions are installed, can take multiple minutes to complete.
As of the latest version, I get the same permission errors as reported in #36
The full error I get is:
flarum | [INFO] First launch, installation...
flarum | Please fix the following errors before we can continue with the installation.
flarum | The /flarum/app directory is not writable.
flarum | Please chmod this directory and its contents to 0775.
flarum | [INFO] End of flarum installation
During the many tests I've done, it also complains about the /flarum/app/public/assets
directory.
I simplified the docker-compose.yml
file to the following:
version: '3'
services:
flarum:
image: flarum-git
container_name: flarum
environment:
- FORUM_URL=http://localhost:8888
- DB_PASS=xxxxxx
- DEBUG=true
- FLARUM_ADMIN_USER=admin
- FLARUM_ADMIN_PASS=xxxxxxx
- FLARUM_ADMIN_MAIL=xxxxxxxxxx
volumes:
- /flarum/app/public/assets
- /flarum/app/extensions
depends_on:
- flarum_mariadb
flarum_mariadb:
image: mariadb:10.2
container_name: flarum_mariadb
volumes:
- /var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=xxxxxxxxxx
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=xxxxxxxx
I have noted that if I the stop it right after that error, remove the installed.txt
file and re-run docker-compose up
, it does work in some combinations of permissions on the volumes that I can not even remember exactly given that I have tried so many that I can't recall!
I also tried setting the GID
and ID
variables to my host user's value and chowning the volumes accordingly, to no avail.
Can anyone try and see if it's possible to reproduce?
Pull this image, copy/paste the file above, change the image name to the one you pull, edit the environnment variables, run it with docker-compose up
, without -d to keep the logs foreground!
nginx: [emerg] unexpected "}" in /etc/nginx/nginx.conf:137
missing a symbol ;
when i use docker to install an extension ,it always fails or automatically pauses,like this:
root@host:~# docker exec -ti flarum extension require flagrow/bazaar
1/9: http://repo.packagist.org/p/provider-archived$9a42801f781ce21eae36dc39736d760c309f5e4895a9c3de0d07e547d6c7b2be.json
2/9: http://repo.packagist.org/p/provider-latest$745ba4033a7c59605c2758c585d28147bbe18bd64e0c6f001a3d6e439be8e1ab.json
3/9: http://repo.packagist.org/p/provider-2018$13ad67b640ef9ef820262c374b7301afd52d55afa66907b31c82fa5405fdcd1e.json
4/9: http://repo.packagist.org/p/provider-2018-04$3402bb729d582639141d90698cc04981ed6a7d5aaebf46899f215ed0972cd0f6.json
5/9: http://repo.packagist.org/p/provider-2018-10$887152be6c120fe66381e72c195c6c53c54a553530f0cede132e2ec56853476d.json
6/9: http://repo.packagist.org/p/provider-2016$6b4efdc0920a04abc04569a25f56d1ce3fc8f6c4a4e446fb2f65623efd75be82.json
7/9: http://repo.packagist.org/p/provider-2017$c12832bd4aeee53c3d87ef3a67bda911d30e58e76bc7357f3639521f6949c6e1.json
can you tell me how to solve this problem ?
Right now, I use docker exec -ti ynz-forum_flarum_1 extension config repo.packagist composer https://packagist.phpcomposer.com
to config mirror url in China. But this config will reset when restart container.
I get no output from ~/flarumdocker # docker container logs flarum
my docker-compose.yml:
version: '2'
services:
flarum:
image: mondedie/docker-flarum:0.1.0-beta.7.1-stable
container_name: flarum
labels:
- traefik.enable=false
environment:
- FORUM_URL=http://forum.123.eu
- DB_PASS=APassword
- DEBUG=true
volumes:
- /mnt/docker/flarum/assets:/flarum/app/assets
- /mnt/docker/flarum/extensions:/flarum/app/extensions
depends_on:
- mariadb
ports:
- "8888:8888"
mariadb:
image: mariadb:10.1
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=LOLOLOLOLOLO
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=APassword
volumes:
- /mnt/docker/mysql/db:/var/lib/mysql
Docker Version
Client:
Version: 17.12.1-ce
API version: 1.35
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:17:21 2018
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.1-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:15:56 2018
OS/Arch: linux/amd64
Experimental: false
Docker-Compose Version
docker-compose version 1.8.0, build unknown
I try to connect via firefox an curl on the url like
curl 127.0.0.1:8888
and get curl: (56) Recv failure: Connection reset by peer
Perhaps we should add a way for people to add apk packages they would like to be installed, similarly to how there's a way to specify extensions that should be installed on container initialization
Hi,
I do not fully understand the step 3: reverse proxy.
Should I provide these 4 files by myself?
- /mnt/docker/nginx/sites-enabled:/sites-enabled
- /mnt/docker/nginx/conf:/conf.d
- /mnt/docker/nginx/log:/var/log/nginx
- /mnt/docker/nginx/certs:/certs
Is there a separated docker-compose.yml
for nginx?
(I guess not, but ask it here)
Should I directly run docker exec -ti nginx ngxproxy
(for reverse proxy) then docker-compose up -d
(step 4 in README.md
) in the same terminal? Or in separated terminals?
Thank you so much!
Hello!
Is it possible not to update extensions every time the container is restarted? What is it for? When there are many extensions, restarting takes a long time. With 12 extensions step "Updating dependencies (including require-dev)" takes 40 seconds.
When trying to run following the instruction in readme, I get this error:
nginx: [alert] could not open error log file: open() "/var/lib/nginx/logs/error.log" failed (13: Permission denied)
Am I doing something wrong? Every time I recreate the docker the config file is lost because it's not "volumed up". I assume I'm doing something wrong as the examples here seem rather complete
Hi guys, when I install Flarum this afternoon, I try to setup proxy by running this command: "docker exec -ti nginx ngxproxy" . But the terminal ask me enter Certificate path without stop. Looks like this 👇
I tried server times, but all happens like this. : (
And the configure file in my docker-composer.yml is like this :
flarum:
image: mondedie/docker-flarum:0.1.0-beta.6-stable
container_name: flarum
links:
- mariadb:mariadb
environment:
- FORUM_URL=https://www.ueec10.com
- DB_PASS=hello123
volumes:
- /mnt/docker/flarum/assets:/flarum/app/assets
- /mnt/docker/flarum/extensions:/flarum/app/extensions
mariadb:
image: mariadb:10.1
container_name: mariadb
volumes:
- /mnt/docker/mysql/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=hello123
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=hello123
nginx:
image: wonderfall/boring-nginx
container_name: nginx
links:
- flarum:flarum
ports:
- "80:8000"
- "443:4430"
volumes:
- /mnt/docker/nginx/sites-enabled:/sites-enabled
- /mnt/docker/nginx/conf:/conf.d
- /mnt/docker/nginx/log:/var/log/nginx
- /mnt/docker/nginx/certs:/certs
Hope your reply, how to enter " Certificate key path" after "Certificate key path" :)
I installed like this:
pull image:
docker pull mondedie/docker-flarum
run:
docker-compose up -d
When I try to visit the forum page: http://my-ip I get error: 404 page not found
I miss something or what?
I am running several containers behind a nginx reverse proxy with SSL encryption.
I have just simply redirected www.example.com/flarum to the exposed port of docker-flarum container:
listen 443;
server_name example.com;
location /flarum {
proxy_pass http://127.0.0.1:8888;
proxy_set_header Host $http_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 $scheme;
}
After starting docker-compose I had the expected Flarum starting screen.
After that I had a mixed-content error that I fixed by modifying config.php, from:
'url' => 'http://www.example.com/community'
to
'url' => 'httpS://www.example.com/community'
However, now I am facing a 404 error on assets (although they are in assets folder).
I am new to flarum so I don't know what to do. I suspect a nginx rule missing ...
Thanks in advance for any help !
The marketplace extension that allows you to add and remove extensions without composer or a terminal.
https://flagrow.io/
https://github.com/flagrow/bazaar/
Error after Bazaar installation :
2018/04/13 20:25:19 [error] 32#32: *28 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught ReflectionException: Class Flagrow\Bazaar\Listeners\AddApiControllers does not exist in /flarum/app/vendor/illuminate/container/Container.php:741
Stack trace:
#0 /flarum/app/vendor/illuminate/container/Container.php(741): ReflectionClass->__construct('Flagrow\\Bazaar\\...')
#1 /flarum/app/vendor/illuminate/container/Container.php(631): Illuminate\Container\Container->build('Flagrow\\Bazaar\\...', Array)
#2 /flarum/app/vendor/flarum/core/src/Foundation/Application.php(514): Illuminate\Container\Container->make('Flagrow\\Bazaar\\...', Array)
#3 /flarum/app/vendor/illuminate/events/Dispatcher.php(149): Flarum\Foundation\Application->make('Flagrow\\Bazaar\\...')
#4 /flarum/app/vendor/illuminate/events/Dispatcher.php(135): Illuminate\Events\Dispatcher->resolveSubscriber('Flagrow\\Bazaar\\...')
#5 /flarum/app/vendor/flagrow/bazaar/bootstrap.php(9): Illuminate\Events\Dispatcher->subscribe('Flagrow\\Bazaar\\...')
#6 [internal function]: Flarum\Extension\ExtensionServiceProv" while reading response header from upstream, client: 127.0.0.1, server: , request: "GET / HTTP/1.1", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "127.0.0.1:8888"
Issue opened here : extiverse/bazaar#110
Thank you for maintaining this docker image!
Could you please make a tag for the recent beta 15?
Hey guys ! I'm trying to run this image on my docker, so followed the README, but I keep getting
ERROR: manifest for mondedie/flarum:stable not found: manifest unknown: manifest unknown
My docker-compose.yml is as follows
version: "3"
services:
flarum:
image: mondedie/flarum:stable
container_name: flarum
env_file:
- ./flarum/flarum.env
volumes:
- ./flarum/assets:/flarum/app/public/assets
- ./flarum/extensions:/flarum/app/extensions
- ./flarum/nginx:/etc/nginx/conf.d
depends_on:
- mariadb
mariadb:
image: mariadb:10.4
container_name: mariadb
ports:
- 3307:3306
environment:
- MYSQL_ROOT_PASSWORD=dzqdzqdzq
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=qzdqdqdzqd
volumes:
- /mnt/docker/mysql/db:/var/lib/mysql
Thx for your help 😄
# User admin flarum
## admin password must contain at least 8 characters
FLARUM_ADMIN_USER=admin
FLARUM_ADMIN_PASS=xxxxxxxxxx
[email protected]
FLARUM_TITLE=Test flarum
When trying to run
docker exec -ti flarum_flarum_1 extension require fof/links
I get the following error
PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar:///usr/local/bin/composer/src/Composer/DependencyResolver/RuleWatchGraph.php on line 52
I already have PHP_MEMORY_LIMIT: 1G
set in my docker-compose.yml
which gets applied correctly
/ # cat /etc/php7/php-fpm.conf | grep memory_limit
php_admin_value[memory_limit] = 1G
I tried upgrading composer to the latest 1.x which did not fix it and 2.x is not compatible with flarum (?).
The host still has 11gb available.
Any ideas?
Hi there, title says most of the problem.
I run flarum with traefik. Installation went fine. I also installed some extensions. Then I wanted to test persistence by going docker-compose down
and docker-compose up -d
but I only get bad gateway now, even though DEBUG=true
and LOG_TO_STDOUT=true
(there are no logs in /var/log/nginx or /var/log/php7).
PHP_EXTENSIONS also seems to do weird things, brotli gets installed in the beginning but then it also says
[InvalidArgumentException]
Could not find package brotli[NAME_OF_FIRST_INSTALLED_FLARUM_EXTENSION_HERE].
Did you mean one of these?
...
If I move the first installed flarum extension from the list down one line it instead says "Could not find package brotli".
Any idea why I get bad gateway and debugging or logging just doesn't happen?
EDIT: At the ~15th try for some reason after 10 minutes of waiting the site worked. I'll try if it really is about waiting.
EDIT2: So if I keep PHP_EXTENSIONS it ignores the extensions in the extensions list. (Doesn't install them on startup.) It does seem to start now, though. It just takes a while without any indication whatsoever in any logs about it.
EDIT3: Removing PHP_EXTENSIONS makes the extension-installation work again.
Hello,
Just found out today that your image is no longer available.
Pulling flarum (mondedie/docker-flarum:0.1.0-beta.8.1-stable)...
pull access denied for mondedie/docker-flarum, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
Furthermore, https://hub.docker.com/r/mondedie/docker-flarum leads to a 404.
docker-compose up
outputroot@ip-172-31-8-177:/srv/Docker/Flarum# docker-compose down && rm -r Data/ && docker-compose up
Removing flarum ... done
Removing mariadb ... done
Network reverseproxy_default is external, skipping
Creating mariadb ... done
Creating flarum ... done
Attaching to mariadb, flarum
mariadb | 2019-10-26 23:05:33 0 [Note] mysqld (mysqld 10.4.8-MariaDB-1:10.4.8+maria~bionic) starting as process 1 ...
flarum | [INFO] First launch, installation...
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Using Linux native AIO
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Uses event mutexes
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Number of pools: 1
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Using SSE2 crc32 instructions
mariadb | 2019-10-26 23:05:33 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Initializing buffer pool, total size = 256M, instances = 1, chunk size = 128M
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Completed initialization of buffer pool
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
mariadb | 2019-10-26 23:05:33 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=23661625
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: Creating shared tablespace for temporary tables
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: 10.4.8 started; log sequence number 23661634; transaction id 17567
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
mariadb | 2019-10-26 23:05:34 0 [Note] Plugin 'FEEDBACK' is disabled.
mariadb | 2019-10-26 23:05:34 0 [Note] Server socket created on IP: '::'.
mariadb | 2019-10-26 23:05:34 0 [Warning] 'proxies_priv' entry '@% root@8fcb80558ea1' ignored in --skip-name-resolve mode.
mariadb | 2019-10-26 23:05:34 0 [Note] Reading of all Master_info entries succeeded
mariadb | 2019-10-26 23:05:34 0 [Note] Added new Master_info '' to hash table
mariadb | 2019-10-26 23:05:34 0 [Note] mysqld: ready for connections.
mariadb | Version: '10.4.8-MariaDB-1:10.4.8+maria~bionic' socket: '/var/run/mysqld/mysqld.sock' port: 3306 mariadb.org binary distribution
mariadb | 2019-10-26 23:05:34 0 [Note] InnoDB: Buffer pool(s) load completed at 191026 23:05:34
flarum | Installing Flarum...
mariadb | 2019-10-26 23:05:45 8 [Warning] Access denied for user 'flarum'@'172.24.0.5' (using password: YES)
flarum | Connecting to database...failed
flarum | Rolling back...
flarum |
flarum | In Pipeline.php line 87:
flarum |
flarum | Step failed
flarum |
flarum |
flarum | In PDOConnection.php line 31:
flarum |
flarum | SQLSTATE[HY000] [1045] Access denied for user 'flarum'@'172.24.0.5' (using
flarum | password: YES)
flarum |
flarum |
flarum | In PDOConnection.php line 27:
flarum |
flarum | SQLSTATE[HY000] [1045] Access denied for user 'flarum'@'172.24.0.5' (using
flarum | password: YES)
flarum |
flarum |
flarum | install [-f|--file FILE] [-c|--config CONFIG]
flarum |
flarum | [INFO] End of flarum installation
flarum.env
outputroot@ip-172-31-8-177:/srv/Docker/Flarum# cat flarum.env
DEBUG=true
FORUM_URL=http://forums.motorboards.tech
Database configuration
DB_HOST=mariadb
DB_NAME=flarum
DB_USER=flarum
DB_PASS=testing123
DB_PREF=flarum_
DB_PORT=3306
User admin flarum (environment variable for first installation)
/!\ admin password must contain at least 8 characters /!
FLARUM_ADMIN_USER=TrevorKSmith
FLARUM_ADMIN_PASS=testing123
FLARUM_ADMIN_MAIL=[email protected]
FLARUM_TITLE=Motorboards Tech
cat docker-compose.yml
outputroot@ip-172-31-8-177:/srv/Docker/Flarum# cat docker-compose.yml
version: "3"
services:
flarum:
image: mondedie/docker-flarum:latest
container_name: flarum
env_file:
- ./flarum.env
volumes:
- ./Data/assets:/flarum/app/public/assets
- ./Data/extensions:/flarum/app/extensions
- ./Data/nginx:/etc/nginx/conf.d
depends_on:
- mariadb
mariadb:
image: mariadb:10.4
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=testing123
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=testing123
volumes:
- ./Data/db:/var/lib/mysql
networks:
default:
external:
name: reverseproxy_default
Something went wrong: <!DOCTYPE html> <html> <head lang="en"> <meta charset="UTF-8"> <title></title> </head> <body> <h1>500 Internal Server Error</h1> <p>Something went wrong on our server.</p> </body> </html>
docker logs flarum
:
[INFO] First launch, you must install flarum by opening your browser and setting database parameters.
docker exec -ti flarum tail -f /tmp/ngx_error.log
:
nothing appears
docker exec -ti flarum tail -f /tmp/php_error.log
:
[29-Jan-2018 22:02:08] NOTICE: fpm is running, pid 12
[29-Jan-2018 22:02:08] NOTICE: ready to handle connections
I followed the README for the install and everything seems to work fine
flarum | [INFO] First launch, installation...
flarum | Installing Flarum...
flarum | Connecting to database...done
flarum | Writing config file...done
flarum | Running migrations...done
flarum | Writing default settings...done
flarum | Creating admin user admin...done
flarum | Publishing all assets...done
flarum | Enabling bundled extensions...done
flarum | DONE.
flarum | [INFO] End of flarum installation
But I used Nginx Proxy Manager for my reverse proxy, and by pointing on the 8888 it only gives me à 502 Bad Gateway from Nginx. Does someone have an idea from where it migth come from ?
Unable to start container, not sure why su-exec
and config.sql
is not being resolved - No such file or directory.
Any idea ?
flarum | [INFO] First launch, installing flarum...
flarum | sed: config.sql: No such file or directory
flarum | su-exec: #: No such file or directory
flarum | /usr/local/bin/run.sh: line 112: can't open config.sql: no such file
flarum | [INFO] Installation done, launch flarum...
flarum | chown: #: No such file or directory
flarum | chown: Optional:991: No such file or directory
flarum | chown: #: No such file or directory
flarum | chown: Optional: No such file or directory
flarum | su-exec: #: No such file or directory
Could you update the flarum docker image to version v0.1.0-beta.8.2?
This is the release: https://github.com/flarum/core/releases/tag/v0.1.0-beta.8.2
Thank you.
Hi, I'm run latest tag in my environment. But I find an error in install page. "The PHP extension 'gd' is required." please help me
I'm running this container in rancher. I upgraded the container and changed a label by doing so (to increase php upload limit) which resulted in loss of database config.
It's as if the environment variables for database settings do nothing at all.
When trying to enter the old database settings I get this with DEBUG=true:
What should I do so the container keeps the database settings?
This is my docker-compose:
version: '2'
volumes:
flarum-vol:
driver: local
flarum-mariadb-vol:
driver: local
services:
flarum:
image: mondedie/docker-flarum:0.1.0-beta.7.1-stable
container_name: flarum
ports:
- 8888
labels:
rap.le_email: XXXXXXX
rap.port: '8888'
io.rancher.scheduler.affinity:host_label: XXXXX=XXXXX
rap.le_host: XXXXXXX
rap.client_max_body_size: 150M
io.rancher.container.pull_image: always
rap.host: XXXXXXXX
environment:
- FORUM_URL=https://XXXXXXX
- DB_PASS=XXXXXXX
- DB_USER=flarum
- DB_PREF=flarum_
- DB_HOST=mariadb
volumes:
- flarum-vol:/flarum/app/
links:
- mariadb
mariadb:
image: mariadb:10.1
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=XXXXXXXXX
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=XXXXXXX
volumes:
- flarum-mariadb-vol:/var/lib/mysql
labels:
io.rancher.container.pull_image: always
io.rancher.scheduler.affinity:host_label: XXXXXX=XXXXXX
1. The /flarum/app directory is not writable.
2. sed: /flarum/app/config.php: No such file or directory
See the site here
This is my .env
DEBUG=true
FORUM_URL=https://forums.mylittlesky.net
LOG_TO_STDOUT=true
# Database configuration
DB_HOST=mariadb
DB_NAME=flarum
DB_USER=flarum
DB_PASS=flarum_password_here
DB_PREF=flarum_
DB_PORT=3306
# User admin flarum (environment variable for first installation)
# /!\ admin password must contain at least 8 characters /!\
FLARUM_ADMIN_USER=admin
FLARUM_ADMIN_PASS=passwordhere
[email protected]
FLARUM_TITLE=Crate Hackers Forum
And docker-compose:
version: "3"
services:
flarum:
image: mondedie/flarum:stable
container_name: flarum
env_file:
- /database/docker/flarum/flarum.env
volumes:
- /database/docker/flarum/assets:/flarum/app/public/assets
- /database/docker/flarum/extensions:/flarum/app/extensions
- /database/docker/flarum/nginx:/etc/nginx/conf.d
depends_on:
- mariadb
mariadb:
image: mariadb:10.4
container_name: mariadb
environment:
- MYSQL_ROOT_PASSWORD=root_password
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=flarum_password_here
volumes:
- /database/docker/mysql/db:/var/lib/mysql
I don't run Nginx on my system, but Caddy so I'm not sure what the /etc/nginx/conf.d
volume is for, or is that maybe the problem?
Also I'm not sure how I can see more debug logging. I've enabled both DEBUG and LOG_TO_STDOUT but I don't see any extra logs.
my stack yml
version: "3"
services:
flarum:
image: mondedie/flarum:stable
ports:
- 80:8888
environment:
DEBUG: 'false'
FORUM_URL: http://192.168.100.100
DB_HOST: mariadb
DB_NAME: flarum
DB_USER: flarum
DB_PASS: flarum
DB_PREF: flarum_
DB_PORT: 3306
FLARUM_ADMIN_USER: admin
FLARUM_ADMIN_PASS: admin123456
FLARUM_ADMIN_MAIL: [email protected]
FLARUM_TITLE: Test Flarum
volumes:
- flarum-assets:/flarum/app/public/assets
- flarum-extensions:/flarum/app/extensions
- flarum-nginx:/etc/nginx/conf.d
depends_on:
- mariadb
mariadb:
image: mariadb:10.4
environment:
- MYSQL_ROOT_PASSWORD=flarum
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=flarum
ports:
- 33306:3306
volumes:
- mariadb-data:/var/lib/mysql
volumes:
mariadb-data:
flarum-assets:
flarum-extensions:
flarum-nginx:
I have error 500 when i tried to install Flarum :
My conf file :
flarum:
image: mondedie/docker-flarum:0.1.0-beta.6-stable
container_name: flarum
links:
- mariadb:mariadb
environment:
- FORUM_URL=https://discuss.domain.fr
- DB_PASS=AtEQ8832q7xWmyM
volumes:
- /mnt/docker/flarum/assets:/flarum/app/assets
- /mnt/docker/flarum/extensions:/flarum/app/extensions
mariadb:
image: mariadb:10.1
container_name: mariadb
volumes:
- /mnt/docker/mysql/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=AtEQ8832q7xWmyM
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=AtEQ8832q7xWmyM
docker ps
root@vps284653:~# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5075fab18ed5 mondedie/docker-flarum:0.1.0-beta.6-stable "run.sh" 7 minutes ago Up 7 minutes 8888/tcp flarum
8f68c0f40ed9 mariadb:10.1 "docker-entrypoint.sh" 7 minutes ago Up 7 minutes 3306/tcp mariadb
No information in docker exec -ti flarum cat /tmp/ngx_error.log
Nginx
server {
listen 80; listen [::]:80;
server_name discuss.domain.fr; # <-- change this
return 301 https://$host$request_uri;
}
server {
listen 443 ssl; listen [::]:443 ssl;
server_name discuss.domain.fr; # <-- change this
ssl on;
ssl_certificate /etc/nginx/ssl/public.pem;
ssl_certificate_key /etc/nginx/ssl/private.pem;
location / {
proxy_pass http://172.17.0.3:8888;
proxy_set_header Host $http_host;
proxy_http_version 1.1;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Une idée ?
So, under current circumstance, we must use an external smtp service to get mailing work.
How to make it work with driver=mail
(that is, sending mails from local machine/container)?
Is there any instruction on running proxy or everyone is expected to figure out on their own?
Maybe providing working default setup (nginx, for example) will do well for 80% of users, and 20% who want to use their own setup (Apache, Caddy, etc) will always be able to change and replace the docker-compose config.
The idea of docker-compose is to lower configuration and running pain to the virtually zero level, after all. And currently every single user has to figure out how to setup and configure the proxy, and that can take hours of googling and guesswork.
What do you think?
e.g. https://extiverse.com/extension/fof/discussion-language requires PHP 7.4.0, I'm getting the following error message:
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- rinvex/countries v7.3.0 requires php ^7.4.0 -> your PHP version (7.3.19) does not satisfy that requirement.
- rinvex/countries v7.2.0 requires php ^7.4.0 -> your PHP version (7.3.19) does not satisfy that requirement.
- rinvex/countries v7.1.0 requires php ^7.4.0 -> your PHP version (7.3.19) does not satisfy that requirement.
- rinvex/countries v7.0.1 requires php ^7.4.0 -> your PHP version (7.3.19) does not satisfy that requirement.
- fof/discussion-language 0.1.2 requires rinvex/countries ^7.0.1 -> satisfiable by rinvex/countries[v7.0.1, v7.1.0, v7.2.0, v7.3.0].
- Installation request for fof/discussion-language ^0.1.2 -> satisfiable by fof/discussion-language[0.1.2].
Installation failed, reverting ./composer.json to its original content.
When I click the install flarum button, I keep getting an internal error. I entered mariadb as the MySQL host, flarum as the database and the username and test123 as the password. Is there any way I can get the logs of the server? My docker version is 1.11.1 and the only output I get from the flarum container is:
flarum | [INFO] First launch, you must install flarum by opening your browser and setting database parameters.
Docker-composle.yml:
flarum:
image: mondedie/docker-flarum
container_name: flarum
links:
- mariadb:mariadb
environment:
- FORUM_URL=http://76.105.7.45:3991
- DB_PASS=test123
- DEBUG=true
volumes:
- /mnt/docker/flarum/assets:/flarum/app/assets
- /mnt/docker/flarum/extensions:/flarum/app/extensions
#- /mnt/docker/flarum/config.php:/flarum/app/config.php
mariadb:
image: mariadb:10.1
container_name: mariadb
volumes:
- /mnt/docker/mysql/db:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=test123
- MYSQL_DATABASE=flarum
- MYSQL_USER=flarum
- MYSQL_PASSWORD=test123
nginx:
image: wonderfall/boring-nginx
container_name: nginx
links:
- flarum:flarum
ports:
- "3991:8000"
- "443:4430"
volumes:
- /mnt/docker/nginx/sites-enabled:/sites-enabled
- /mnt/docker/nginx/conf:/conf.d
- /mnt/docker/nginx/log:/var/log/nginx
- /mnt/docker/nginx/certs:/certs
Duplicate the issue from flrume/core/issue/1204, which I should submit at here.
This shows private credentials when running in docker and using 'networks' as external. when it shows 'access denied' and throws the exception, no matter what I try, it shows the password to my database and all my info.
I've tried running bind mounts on php-fpm.conf, www.conf and php.ini after copying them from the image and pasting them back, it still shows all of my information if the database is down. The password is is cleartext form, not encrypted AT ALL. This is a major flaw as I've tried many things to fix it and nothing helps. Very compromising.
I'm having an issue when creating container using Dockerfile
for flarum
and mariadb
since there's no official documentation about this. I tried to pass environment variables described in docker-compose.yml
as arguments, but it didn't work. Thanks
hi, I just installed Flarum but when I go to the configured URL the installer shows up again.
When I enter the credentials I entered in the flarum.env, an error occurs:
flarum_1 | In Connection.php line 669:
flarum_1 |
flarum_1 | SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'fl_migratio
flarum_1 | ns' already exists (SQL: create table `fl_migrations` (`migration` varchar(
flarum_1 | 255) not null, `extension` varchar(255) null) default character set utf8mb4
flarum_1 | collate 'utf8mb4_unicode_ci' engine = InnoDB)
flarum_1 |
flarum_1 |
flarum_1 | In Exception.php line 18:
flarum_1 |
flarum_1 | SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'fl_migratio
flarum_1 | ns' already exists
flarum_1 |
flarum_1 |
flarum_1 | In PDOStatement.php line 115:
flarum_1 |
flarum_1 | SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'fl_migratio
flarum_1 | ns' already exists
flarum_1 |
flarum_1 |
flarum_1 | install [-f|--file FILE] [-c|--config CONFIG] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [--] <command>
flarum_1 |
flarum_1 | [INFO] End of flarum installation
flarum_1 | [INFO] First launch, installation...
flarum_1 | Installing Flarum...
flarum_1 | Connecting to database...failed
flarum_1 | Rolling back...
flarum_1 |
flarum_1 | In Pipeline.php line 85:
flarum_1 |
flarum_1 | Step failed
flarum_1 |
flarum_1 |
flarum_1 | In Exception.php line 18:
flarum_1 |
flarum_1 | SQLSTATE[HY000] [2002] Connection refused
flarum_1 |
flarum_1 |
flarum_1 | In PDOConnection.php line 38:
flarum_1 |
flarum_1 | SQLSTATE[HY000] [2002] Connection refused
Seems to be the case that flarum wants to install itself on every launch…
For being able to have multiple flarum behind a proxy, I can't see any solution but this :| maybe i'm wrong ?
http:\myip i get
404 page not found
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.