Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to start uwazi-docker with test data #51

Closed
fititnt opened this issue Jul 26, 2023 · 3 comments
Closed

Document how to start uwazi-docker with test data #51

fititnt opened this issue Jul 26, 2023 · 3 comments

Comments

@fititnt
Copy link
Owner

fititnt commented Jul 26, 2023

From #48 (comment) by @mayeulk

Is there a test database already populated with documents, a full data model with many relationships among entities, a rich collection, etc?
This could help testing a lot.
Thank you.

Reports from #48 and #50 would be easy to debug already with testdata.

In theory, this already is possible, because the README.md (Advanced) All initialization options with default values give a hint on how to change a few variables. But last update on this repository, I did not investigate which exactly path was used for testdata.

@mayeulk
Copy link
Contributor

mayeulk commented Jul 26, 2023

Thanks for this. I first did not see that clicking the arrow there would display some text.
I could not find the path, in the container, in the doc or on uwazi's git.
I did a "yarn test" within the container; after 30 minutes, I/O started on container uwazi-docker-mongo-1; 100 MB in one hour (still, at the end, there were no documents in the GUI).

there are some import { data } from './testData';, see https://github.com/search?q=repo%3Ahuridocs%2Fuwazi%20testdata&type=code

However, some Uwazi users allow to export large quantities of data as CSV; for instance: https://www.girlsrightsplatform.org/library/ (their terms and conditions do not state any license; unsure how to reuse/share this).

@fititnt
Copy link
Owner Author

fititnt commented Jul 30, 2023

Ok, while it does not import the PDFs and JPGs from the fixtures, it does load the data.

Even before the next commits I will make, instead of this

git clone https://github.com/fititnt/uwazi-docker.git
cd uwazi-docker
docker compose run -e IS_FIRST_RUN=true --rm uwazi # Install/Re-install from empty data

Run with this

git clone https://github.com/fititnt/uwazi-docker.git
cd uwazi-docker
docker compose run -e IS_FIRST_RUN=true -e UWAZI_GIT_RELEASE_REF=production -e DB_INITIALIZATION_PATH=/home/node/uwazi/uwazi-fixtures/dump/uwazi_development --rm uwazi

Then already will have a result like this

Screenshot from 2023-07-30 18-58-19

I guess a shortcut for this option, from IS_FIRST_RUN=true to IS_FIRST_DEMO_RUN=true, would already initialize the first run not with blank state, but with data from https://github.com/huridocs/uwazi/tree/development/uwazi-fixtures

@fititnt
Copy link
Owner Author

fititnt commented Jul 30, 2023

Ok, I will close this issue, but now theres another option (maybe will need improve documentation, but in theory should allow both start with blank state and with test data

### Install
Run these commands on your terminal **only** the first time:

```bash
git clone https://github.com/fititnt/uwazi-docker.git
cd uwazi-docker
docker compose run -e IS_FIRST_RUN=true --rm uwazi # Install without sample data
# docker compose run -e IS_FIRST_DEMO_RUN=true --rm uwazi # Install with sample data

With very fast internet and disks, this step will take between 8 to 15 minutes.
The IS_FIRST_DEMO_RUN=true is an alternative that starts with test/example data.


Also, I noticed that the testdata have a different initial password than the blank state, but changed that part of documentation.

If anyone in the future have problems starting the testdata, either commend here again or can open a new issue.

(now the other topics migth get easier to check)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants