Skip to content

HiddevH/icalfeed_proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iCal feed proxy

This repository contains a 'proxy' to retrieve an iCal feed from external location and forward it to the requester.

Why? Because some booking websites block the opening of their iCal feed by certain tools, so this is a workaround for that.

In the folder app you will find:

  • The python script api.py which handles the actual API requests
  • requirements.txt which contains the Python packages used
  • Dockerfile with the instructions to build the container

Application

Within the folder app there is a script called api.py. This script is basically a Flask application which listens on port 5000 for API requests. The API requests possible are:

  • /icalfeed which returns an iCal feed which is passed from ENV ICAL_FEED

Dockerfile

The API is supposed to live in a Docker container. A brief overview of its contents:

  • Use the lightweight python:3.7-slim-buster distribution
  • Copy requirements.txt and pip install on it
  • Create a non-root User to run the scripts (according to some best practices found at https://pythonspeed.com/docker/)
  • Set environment variables
  • Expose port 5000
  • Run Flask

Docker Compose

I use this flask app with Docker Compose, an example docker-compose is:

version: '3'
services:
  web:
    build: .
    ports:
      - "5000:5000"
    volumes:
      - .:/src
    environment:
      FLASK_ENV: production
      ICAL_FEED: icalfeedhere

Usage

<ip>:5000/icalfeed

Should return an ical feed

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published