Skip to content

Docker build files and tweaks#35

Merged
B13rg merged 53 commits intodeadlock-wiki:developfrom
B13rg:docker-build
Sep 25, 2024
Merged

Docker build files and tweaks#35
B13rg merged 53 commits intodeadlock-wiki:developfrom
B13rg:docker-build

Conversation

@B13rg
Copy link
Copy Markdown
Contributor

@B13rg B13rg commented Sep 22, 2024

I'd appreciate a squash before merging!

Changes:

  • moved OUTPUT_DIR env var to a higher level, and made sure it's respected everywhere
  • have everything output in the OUTPUT_DIR, including the decompiler_data. Still cleanup afterward, just from the main.sh script
  • added the version.txt file to the output data for reference. (usefule for automation?)
  • modified kv3_to_json.py to take the output file as a second parameter instead of calculating it
  • os.path.join(a,b) scattered everywhere
  • create a dockerfile with python 3.12
  • create a docker compose that builds and runs the script automatically
  • added a docker build github action, that will build that container that decompiles and parses the game files.
  • updated against the latest gamefiles

Tested with:

  • Docker version 27.2.0, build 3ab4256
  • Docker Compose version v2.23.1

@B13rg B13rg marked this pull request as ready for review September 22, 2024 05:04
Copy link
Copy Markdown
Member

@hassayag hassayag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is excellent, I've left some thoughts on keeping output-data and decompiled-data separate, let me know what you think.

Running the code locally unfortunately is not working, as it fails at the parsing stage. Does it fully work for you when you run main.sh?

@hassayag
Copy link
Copy Markdown
Member

I've also invited you to the org, so future work can be on the main repo

@B13rg
Copy link
Copy Markdown
Contributor Author

B13rg commented Sep 22, 2024

Thank you for the review and invite! I'll start working on those fixes!

@B13rg
Copy link
Copy Markdown
Contributor Author

B13rg commented Sep 24, 2024

Of course!

So my goal with the docker container is to make it simpler to deploy and update the output data.
It packages up all the dependencies and make it so users only need docker. This will also make it easier to hook up to automation.
Instead of users needing to manually push update to keep the wiki data in sync, it could be ran based on game updates.

Down the line, I think it would be nice to add releases and tag each version of the game data to make it easier to compare changes over time


For the windows issue, are you running it on WSL?

@Surxe
Copy link
Copy Markdown
Contributor

Surxe commented Sep 24, 2024

Of course!

So my goal with the docker container is to make it simpler to deploy and update the output data. It packages up all the dependencies and make it so users only need docker. This will also make it easier to hook up to automation. Instead of users needing to manually push update to keep the wiki data in sync, it could be ran based on game updates.

Down the line, I think it would be nice to add releases and tag each version of the game data to make it easier to compare changes over time

For the windows issue, are you running it on WSL?

That would be awesome! For tracking changes, the s3.py file uploads it to an s3 bucket, could you join the deadlock community discord and join the #wiki channel? We can link up there!

@hassayag
Copy link
Copy Markdown
Member

hassayag commented Sep 24, 2024

So my goal with the docker container is to make it simpler to deploy and update the output data. It packages up all the dependencies and make it so users only need docker. This will also make it easier to hook up to automation. Instead of users needing to manually push update to keep the wiki data in sync, it could be ran based on game updates.

Ah so its a way of having a consistent environment for handling the game files locally, I get you now

Down the line, I think it would be nice to add releases and tag each version of the game data to make it easier to compare changes over time

Big fan of this!

For the windows issue, are you running it on WSL?

I am yeah. How about we link up on discord and I can show you what errors I get. username - hariyosaag

@hassayag hassayag changed the base branch from master to develop September 25, 2024 22:49
Copy link
Copy Markdown
Member

@hassayag hassayag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it going now, but I am getting some weirdness with the paths. Eg. this is the only error I get cp: cannot create regular file '../../output-data/version.txt': No such file or directory

I think I'd like to just merge it and resolve this separately, as maybe moving decompile.sh will simplify the path issues

Moved target branch to a new develop branch so we can keep master stable

In any case, what a bold first PR, good stuff 🔥

@B13rg
Copy link
Copy Markdown
Contributor Author

B13rg commented Sep 25, 2024

Ahh, I like the separate branch!
Yeah, it might be a python version thing, The readme suggested is 3.11 but I went and used the latest 3.12. We can sort it out during the develop -> master merge :)

@B13rg B13rg merged commit ea6cd8a into deadlock-wiki:develop Sep 25, 2024
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

Successfully merging this pull request may close these issues.

3 participants