Get your Xyzzy on: docker pull ghcr.io/cyb3r-jak3/dockeryourxyzzy
- Github: ghcr.io/cyb3r-jak3/dockeryourxyzzy
- Docker Hub: cyb3rjak3/dockeryourxyzzy
This is a containerized build of the Pretend You're Xyzzy Cards Against Humanity clone.
The PYX project can be used in Docker format for development, outputting the built files, or running in production.
The prebuilt
tag is an image that already has built pxy war file but offers no customization. It is quicker to deploy.
The on-demand
tag is an image that contains the tools to build the pxy war file. Takes longer to deploy but is smaller and offers customization.
An example stack of PYX with a Postgres database and an Ngrok tunnel can be found in examples/ngrok/docker-compose.yml:
Once the containers are running, you can:
- Visit http://localhost:8080/game.jsp to play locally
- Visit http://localhost:4040/status to find your Ngrok URL
- Visit https://#####.ngrok.io to share publicly
An example stack of PYX with a Postgres database and an cloudflared tunnel can be found in example/cloudflare/docker-compose.yml
Requires having a tunnel created and configured. Guide
Keep the container up with SQLite and war:exploded jetty:run
:
docker run -d \
-p 8080:8080 \
--name pyx-dev \
ghcr.io/cyb3r-jak3/dockeryourxyzzy:latest
# Visit http://localhost:8080 in your browser
# Or, start a bash session within the container:
docker exec -it pyx-dev bash
Settings in build.properties
can be modified by passing them in the container CMD:
docker run -d \
-p 8080:8080 \
ghcr.io/cyb3r-jak3/dockeryourxyzzy:on-demand \
mvn clean package war:war \
-Dhttps.protocols=TLSv1.2 \
-Dmaven.buildNumber.doCheck=false \
-Dmaven.buildNumber.doUpdate=false \
-Dmaven.hibernate.url=jdbc:postgresql://postgres/pyx
Also are able to do more complex overrides by making a copy of build.properties and mounting that in overrides.
docker run -d \
-p 8080:8080 \
-v $(pwd)/build.properties:/overrides/build.properties \
ghcr.io/cyb3r-jak3/dockeryourxyzzy:on-demand
This project can be built and run by any of the 2 following methods: CLI docker build
commands, CLI docker buildx bake
commands.
# Build pre-built image
docker build --target pre-built -t pyx .
# Build on-demand image
docker build --target on-demand -t pyx .
Requires Buildx
Bake target can be found in docker-bake.hcl:
# Build pre-built image
docker buildx bake pre-built
# Build on-demand image
docker buildx bake on-demand
- Figure out how to run
:latest
properly with a Postgres db - Import & run sql files if specified for the Postgres db
- Buildtime config customization via Maven flags
- Runtime config customization via Maven flags
- Fetch GeoIP database in entrypoint.sh
- Versioning and tagging isn't done well here because Pretend You're Xyzzy doesn't seem to tag or version.