API to fetch available tickets for a specific performance you can find on the website.
The app is expecting the following environment variables are defined:
PORT(Default: 5000) - the port the app is listening onTHEATRE_API_DOMAIN- the domain of the theatre APITHEATRE_API_TIMEOUT- response timeout of APITHEATRE_API_SESSION_KEYTHEATRE_API_SOURCE_NUMBERTHEATRE_API_MOS- the mode of sale
Those can be defined either by exporting them manually (in bash export VARIABLE=VALUE) or by creating the .env file in project directory. For the
latter option you may look at .env.example file with sample values.
Important
Ensure Node.JS is installed on your system
Install required packages by running npm install or npm i for short.
Then run npm start to launch the app.
Important
Ensure Docker is installed on your system and Docker daemon is running
- Get the image
# pull from Docker Hub
docker pull staleread/ticket-fetcher
# or build by yourself
docker build -t my-app:latest .Warning
Building process involves multi-staging approach to decouple the build
stages and make the size of resulting image as small as possible. This
leads to dangling images (<none>:<none>) being generated. You can remove
them by running docker image prune -f
- Run the container
image=staleread/ticket-fetcher # or your custom build name
docker run \
-it \
--expose 5000 \
-p 80:5000 \
--env-file .env \
--name my-container
$image