summertriangle-dev / arposandra

Source code for allstars.kirara.ca. Tornado app; React interactive components.
https://allstars.kirara.ca
Other
15 stars 5 forks source link

how can I fix this or teach me how to settimg. #30

Open TunglinInamin opened 1 year ago

TunglinInamin commented 1 year ago

as title, my 80 port is used. and I don't know how to use docker-compose

where is put masterdata.db image

or give me full operate

summertriangle-dev commented 1 year ago

It is looking for database files in /usr/share/nginx/asplorer/external/astool_storage/jp. This is from the perspective of the docker container, which is probably not what you want.

I recommend resetting the path to its default of /external/astool_storage, and mapping a host directory to it using the compose file (https://github.com/summertriangle-dev/arposandra/blob/master/variants/config.staging.yml#L20)

The first path is the directory on the host (where you have a "jp" directory with databases in it). The second path is the directory in the container (which should be left as /external/astool_storage). The third part specifies that it should be read only.

TunglinInamin commented 1 year ago

I change it default and show this: image it show my folder is ./jp and I put masterdata.db, it show can't opened again.

buy the why, I use this commend error: image

and masterdata.db encrypt version or not?

TunglinInamin commented 1 year ago

it's can found but encode error image I think default is utf-8, but it can't run.

and use newest code show like this => ERROR [extension-builder 9/9] RUN (test -f /build/lib/setup.py && pip --no-cache-dir install --prefix=/install "./lib[async_pkg]")

TunglinInamin commented 1 year ago

image

image

Service asset has neither an image nor a build context specified. At least one must be provided.

summertriangle-dev commented 1 year ago

Update to latest and comment out the failing Dockerfile line (26). It's not needed for the server but you won't be able to run maintenance tasks. Then pass all necessary compose files like so: docker-compose -f docker-compose.yml -f variants/config.dev.yml -f variants/config.postgres.yml ...

TunglinInamin commented 1 year ago

Update to latest and comment out the failing Dockerfile line (26). It's not needed for the server but you won't be able to run maintenance tasks. Then pass all necessary compose files like so: docker-compose -f docker-compose.yml -f variants/config.dev.yml -f variants/config.postgres.yml ...

latest without variants/config.postgres.yml file, it's not need?

AND image

mkdir bin in maintenance image

imageand then?

summertriangle-dev commented 1 year ago

Both start.sh and maintenance/start.sh need to be chmod +x. None of the tools in the utils image will work for you so just don't run the utils container.

docker-compose ... up web asset db js-dev

TunglinInamin commented 1 year ago

image

It's run, but I don't know what this error.

And I don't know about my port

summertriangle-dev commented 1 year ago

See my first comment for where to put database files: https://github.com/summertriangle-dev/arposandra/issues/30#issuecomment-1418257995 . Port mappings are defined in (for you) config.dev.yml, the default is 5000 for web and 5001 for asset.

TunglinInamin commented 1 year ago

/> See my first comment for where to put database files: #30 (comment) . Port mappings are defined in (for you) config.dev.yml, the default is 5000 for web and 5001 for asset.

I have been put db files in /external/astool_storage/jp but it shows it's can open.

it's also show it read /external/astool_storage/jp/asset_i_ja.db image

image

image

summertriangle-dev commented 1 year ago

Where is masterdata.db on the host?

TunglinInamin commented 1 year ago

Where is masterdata.db on the host?

I put it in /external/astool_storage/jp & /external/astool_storage

Is it need decrypt or encrypt one?

summertriangle-dev commented 1 year ago

Like I said in my first comment: https://github.com/summertriangle-dev/arposandra/issues/30#issuecomment-1418257995 , you need to map the host directory into the container by editing the entry in the volumes: section of the compose file.

volumes:
  - /somewhere_on_the_host:/external/astool_storage:ro

The first path is the directory on the host (where you have a "jp" directory with databases in it). The second path is the directory in the container (which should be left as /external/astool_storage). The third part specifies that it should be read only.

TunglinInamin commented 1 year ago

Like I said in my first comment: #30 (comment) , you need to map the host directory into the container by editing the entry in the volumes: section of the compose file.

volumes:
  - /somewhere_on_the_host:/external/astool_storage:ro

The first path is the directory on the host (where you have a "jp" directory with databases in it). The second path is the directory in the container (which should be left as /external/astool_storage). The third part specifies that it should be read only.

which type volumes be added?

I added to asset/web/db still error. or add to compose like this: image

summertriangle-dev commented 1 year ago

229394843-1855d74b-db37-4a21-9374-21234e8542e2

It is erroring because /somewhere_on_the_host is an example path and not the real directory.

TunglinInamin commented 1 year ago

229394843-1855d74b-db37-4a21-9374-21234e8542e2

It is erroring because /somewhere_on_the_host is an example path and not the real directory.

image

I try it, but it's error.

And I need change for db/asset/web?

config.dev.txt

summertriangle-dev commented 1 year ago

Remove /ja. The application will add it for you.

And I need change for db/asset/web?

Yes, but not for the db container.

TunglinInamin commented 1 year ago

I think I need you help me edit something

asset still exit and has some error

config.dev.txt

summertriangle-dev commented 1 year ago

I will not write your config file for you. Post an error log and I'll tell you what to look at, though.

TunglinInamin commented 1 year ago

I will not write your config file for you. Post an error log and I'll tell you what to look at, though.

image Now like this image image image

summertriangle-dev commented 1 year ago

Check whether the files in /external/astool_storage are world-readable. If not, do

chmod -R o+r /external/astool_storage
chmod o+x /external/astool_storage/jp

to fix it.

Also set the AS_EXTRA_DICTIONARIES and AS_EXTRA_REGIONS environment vars to empty strings, otherwise they will cause errors later.

TunglinInamin commented 1 year ago

Check whether the files in /external/astool_storage are world-readable. If not, do

chmod -R o+r /external/astool_storage
chmod o+x /external/astool_storage/jp

to fix it.

Also set the AS_EXTRA_DICTIONARIES and AS_EXTRA_REGIONS environment vars to empty strings, otherwise they will cause errors later.

image image

it's just same.

And I think I also do en,zh,ko.

summertriangle-dev commented 1 year ago

What is the output of

stat /external
stat /external/astool_storage
stat /external/astool_storage/jp

?

If astool_store.json exists, remove it.

And I think I also do en,zh,ko.

This is currently not possible without an astool-managed data directory. You can try but it will cause errors, and I cannot help you fix them.

TunglinInamin commented 1 year ago

What is the output of

stat /external
stat /external/astool_storage
stat /external/astool_storage/jp

?

If astool_store.json exists, remove it.

And I think I also do en,zh,ko.

This is currently not possible without an astool-managed data directory. You can try but it will cause errors, and I cannot help you fix them.

It's not exists.

summertriangle-dev commented 1 year ago

And the output of the stat commands?

TunglinInamin commented 1 year ago

And the output of the stat commands?

image

TunglinInamin commented 1 year ago

I change /external/astool_storage/jp/ to 777. It's running, but carddata/image is error. image

image image

And I have remove PostgreSQL 15, and install PostgreSQL 12, it said I have PostgreSQL 15 image

summertriangle-dev commented 1 year ago

You'll need to frankenstein together an astool-managed data directory to run the card indexer.

First set up your /external/astool_storage like this:

Then create /external/astool_storage/jp/astool_store.json with the content:

{"master_version": "0000000000000000",  "latest_complete_master": "0000000000000000"}

Then run the indexer:

docker-compose -f ... run --rm utils sh -c 'python3 mtrack/mtrack.py -X -x jp 0000000000000000'
docker-compose -f ... run --rm utils sh -c 'python3 mtrack/run_script.py -f mtrack/init-sets.sql'

If you're lucky that will fix the card pages.

TunglinInamin commented 1 year ago

You'll need to frankenstein together an astool-managed data directory to run the card indexer.

First set up your /external/astool_storage like this:

  • /external/

    • astool_storage/

    • jp/

      • masters/

      • 0000000000000000/

        • masterdata.db, etc.
      • cache/

      • All pkg* directories go here if you have them, otherwise leave empty. This will make images work if you have the files.

Then create /external/astool_storage/jp/astool_store.json with the content:

{"master_version": "0000000000000000",  "latest_complete_master": "0000000000000000"}

Then run the indexer:

docker-compose -f ... run --rm utils sh -c 'python3 mtrack/mtrack.py -X -x jp 0000000000000000'
docker-compose -f ... run --rm utils sh -c 'python3 mtrack/run_script.py -f mtrack/init-sets.sql'

If you're lucky that will fix the card pages.

image

Use utils will error.

chmod +x start.sh is runed.

and what pkg directories, I only have pkg file.

summertriangle-dev commented 1 year ago

maintenance/start.sh also needs to be executable.

TunglinInamin commented 1 year ago

The error is exclude, but image is not show.

I put all pkg files in cache, but it's not decrypt.

and how to update news?

summertriangle-dev commented 1 year ago

The cache directory should look like this. Files should be encrypted as they were originally.

image

and how to update news?

This is not something I can help you with, sorry.

TunglinInamin commented 1 year ago

The cache directory should look like this. Files should be encrypted as they were originally.

image

I follow it, but image not show. image PORT is 5001, right?

and how to update news?

This is not something I can help you with, sorry.

OK, but event and gacha?

summertriangle-dev commented 1 year ago

The port should be left as "5001:30001", with 5001 being where you want it to listen on the host side.

The gacha and event lists are derived from news so they will also not work.

TunglinInamin commented 1 year ago

sometimes it will show this image

it can't add sub language?

summertriangle-dev commented 1 year ago

If this is for AS_EXTRA_DICTIONARIES, they need to be in serverid:langid:descriptive_name format.

The descriptive_name part is shown in the language menu and can be anything you want.

The server will then look for strings in $AS_DATA_ROOT/[serverid]/masters/......../dictionary_[langid]*.db. For example, if you put your dbs in /external/astool_storage/jp/masters/0000000000000000/dictionary_en_*.db then you would add jp:en:English to AS_EXTRA_DICTIONARIES. You can also do multiple languages by separating each tuple with ; (e.g. jp:en:English;jp:zh:Chinese).

TunglinInamin commented 1 year ago

Code have some bug image