Skip to content

iftechfoundation/ifarchive-unbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IF Archive Unboxing Service

The Unbox service allows users to view the contents of zip and tar.gz packages on the IF Archive. For browser games (such as zipped Twine games), this is all that's needed to make them directly playable.

Unbox also allows web interpreters (such as iplayif.com) to play zipped-up game files.

Behavior

The front page (https://unbox.ifarchive.org/) requests an Archive URL or path. This must be the URL of a zip or tar.gz on the IF Archive.

For example, you might enter the URL https://ifarchive.org/if-archive/games/twine/Absent_Heroes.zip.

This returns a page listing the package contents:

Click on index.html to launch the Twine game. You can also view the images or the CSS file, if you so desire.

For a complete description of Unbox's capabilities, see the specification document.

Running Unbox

To run with Docker Compose:

docker-compose up --build -d

To adjust configuration options, create a file data/options.json containing a JSON map. (The data directory will be created the first time you start the service.) See the options.json documentation for configuration details.

Development

You can run Unbox on your local machine. You must first install Docker and Docker Compose.

The service uses ports 80 (for the outward-facing nginx server) and 8080 (for the internal ifarchive-unbox server). If you are already running a web service on port 80, you will have to reconfigure Unbox to use a different port. To do this, replace "80" with "8000" in docker-compose.yml and nginx/nginx.sh.

If you modify the source code, you must bring the service down and back up to see changes:

docker-compose down
docker-compose up --build

Then once you are satisfied, run the containers in the background with -d:

docker-compose down
docker-compose up --build -d

If you need to empty the cache, follow these steps:

  1. docker-compose down
  2. rm -rf data/cache data/nginx-cache
  3. Clear the Cloudflare cache
  4. docker-compose up --build -d