Database file is overwritten after server restart
bepitulaz opened this issue · comments
Asep Bagja Priandana commented
My steps when I got the bug:
- Built a binary from the source.
- Ran the binary as usual. I ran
./tania-core &
. Then I filled Tania with data. - Killed the pid.
- Changed
redirect_uri
inconf.json
to another hostname. - Ran the binary again with
./tania-core &
.
Voiilaaa...the entire data was wiped out. I had to start from a clean slate again 😌
Adhatama commented
@bepitulaz Can you give me your conf.json
values?
Asep Bagja Priandana commented
{
"tania_persistence_engine": "sqlite",
"demo_mode": true,
"upload_path_area": "uploads/areas",
"upload_path_crop": "uploads/crops",
"sqlite_path": "db/sqlite/tania.db",
"mysql_host": "127.0.0.1",
"mysql_port": "3306",
"mysql_dbname": "tania",
"mysql_user": "root",
"mysql_password": "root",
"redirect_uri": "https://demo-tania.tanibox.com/",
"client_id": "f0ece679-3f53-463e-b624-73e83049d6ac"
}
Adhatama commented
@bepitulaz If I saw your steps, you need to rebuild the frontend with npm run dev
because you've changed the conf.json
. The frontend reads the the conf.json
when built.
But I'm not sure if that was the source of why the database was wiped.
Asep Bagja Priandana commented
@adhatama no, the culprit is not on the frontend. I suspect somewhere on
the `main.go`. Of course, I changed the `redirect_uri` on the frontend by
using `sed` tool.
I made a shell script to automate the installation without rebuild the
front-end.
…On Mon, 2 Jul 2018, 08:13 Adhatama, ***@***.***> wrote:
@bepitulaz <https://github.com/bepitulaz> If I saw your steps, you need
to rebuild the frontend with npm run dev because you've changed the
conf.json. The frontend reads the the conf.json when built.
But I'm not sure if that was the source of why the database was wiped.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#17 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AATKavNRIgu6WlQZHpALI8R-XuwoQ8-8ks5uCWW9gaJpZM4U-BhR>
.
Adhatama commented
Closed because cannot be reproduced