emcniece / DockerYourXyzzy

Dockerized Cards Against Humanity clone - https://github.com/ajanata/PretendYoureXyzzy
71 stars 38 forks source link

Load the the standard cards in postgresql when started the first time #15

Closed DavidNiehues closed 3 years ago

DavidNiehues commented 3 years ago

This pull request automatically loads the default card decks to the game when postgresql is used instead of sqlite. It does so as follows.

The pull-request adds cah_cards.sql from the PretendYoureXyzzy repository into the directory init-db.d. This directory is then mapped to /docker-entrypoint-initdb.d/ in the postgresql container.

For the maintainers: I just added cah_cards.sql from the PretendYoureXyzzy. If you have any licensing concerns, one could also remove the sql-file and just explain which file has to be placed into the directory.

emcniece commented 3 years ago

Wow, nice! Looks good, I'll give it a test tonight.

emcniece commented 3 years ago

Works like a charm. Thank you for the PR!

DavidNiehues commented 3 years ago

Thanks for merging. I'm Happy to help :-)