The issue
I had sucessfully installed a flarum site by using RikoDEV's docker image This site has been smoothly ran for half a year.
Below is part of the config for the flarum docker container:
services:
flarum:
image: ghcr.io/rikodev/flarum-docker:latest
container_name: flarum
env_file:
- flarum.env
volumes:
- ./data/flarum/public/assets:/flarum/app/public/assets
- ./data/flarum/extensions:/flarum/app/extensions
- ./data/flarum/storage/logs:/flarum/app/storage/logs
- ./data/flarum/nginx:/etc/nginx/flarum
- ./data/flarum/vendor:/flarum/app/vendor
- ./data/flarum/composer.json:/flarum/app/composer.json
- ./data/flarum/composer.lock:/flarum/app/composer.lock
ports:
- 8080:8888
depends_on:
- mariadb
- meili
I did the following things and lost all forum settings and posts:
- copy all files except assets in public from docker container to local directory ./data/flarum/public
- assets is already in local directory and mounted to docker container, so no need to copy
- three files were copied: index.php, web.config, and .htaccess
- change docker-compose.yml to mount the entier public directory instead of only the assets
- ./data/flarum/public/assets:/flarum/app/public/assets
to
- ./data/flarum/public:/flarum/app/public
Then after restart the flarum, I find that the forum is re-initilized and all user data, including forum settings, user profile and all posts are gone. I tried to resotre all changes and restart the flarum but all those missing data won't come back. I don't see anything in the storage/logs.
Can anyone please help me resolve this problem? Thanks!
Flarum information
Flarum core: 1.8.5
PHP version: 8.2.13
MySQL version: 11.2.3-MariaDB-1:11.2.3+maria~ubu2204
Loaded extensions: Core, date, libxml, pcre, zlib, filter, hash, json, random, readline, Reflection, SPL, session, zend_test, ctype, curl, dom, fileinfo, gd, gmp, iconv, intl, mbstring, openssl, PDO, standard, tokenizer, xmlwriter, zip, exif, mysqlnd, Phar, pdo_mysql, apcu, Zend OPcache
+--------------------------------+------------+--------+
| Flarum Extensions | | |
+--------------------------------+------------+--------+
| ID | Version | Commit |
+--------------------------------+------------+--------+
| flarum-tags | v1.8.0 | |
| flarum-mentions | v1.8.3 | |
| flarum-subscriptions | v1.8.0 | |
| fof-follow-tags | 1.2.6 | |
| flarum-likes | v1.8.0 | |
| the-turk-mathren | 1.0.7 | |
| sycho-profile-cover | v1.3.5 | |
| justoverclock-hashtag | 1.0.1 | |
| fof-user-bio | 1.4.0 | |
| fof-upload | 1.5.5 | |
| fof-profile-image-crop | 1.1.6 | |
| fof-merge-discussions | 1.4.1 | |
| fof-formatting | 1.0.3 | |
| fof-default-user-preferences | 1.2.1 | |
| fof-default-group | 1.1.2 | |
| fof-best-answer | 1.4.5 | |
| flarum-sticky | v1.8.0 | |
| flarum-statistics | v1.8.0 | |
| flarum-nicknames | v1.8.0 | |
| flarum-markdown | v1.8.0 | |
| flarum-lang-chinese-simplified | dev-master | |
| flarum-flags | v1.8.0 | |
| flarum-bbcode | v1.8.0 | |
| datlechin-copy-links | v1.0.1 | |
| darkle-fancybox | 1.1.4 | |
| clarkwinkelmann-scout | 0.3.5 | |
| clarkwinkelmann-likes-received | 1.0.2 | |
+--------------------------------+------------+--------+
Base URL: http://my_ip:8080
Installation path: /flarum/app
Queue driver: sync
Session driver: file
Scheduler status: 从未运行
Mail driver: smtp
Debug mode: off