GPL-2.0 License
Python: 3.7, 3.8, 3.9, 3.10
There are several commercial solutions which allow embedding of calendars into my website. I only have a link to an ICS file and want to show a nice-looking calendar on my site. Browser-only calendars usually have the problem that many ICS files can not be accessed (such as ownCloud/nextCloud in my case). I also want to be in control over who knows the people who visit the site and not pass everything to Google. This is a solution in my case which I share with the world. You are free to use it or deploy your own, modify or share it. It works offline and in company networks, too.
Features
You can deploy the app using Heroku. There is a free plan.
Heroku uses gunicorn to run the server, see the Procfile.
These environment variables can be used to configure the service:
APP_DEBUG
default true
, values true
or false
, always false
in the Docker containerPORT
default 5000
, default 80
in the Docker containerWORKERS
default 4
only for the Docker containerCACHE_REQUESTED_URLS_FOR_SECONDS
default 600
To build the container yourself type the command
docker build --tag niccokunzmann/open-web-calendar .
You can also use the existing image.
docker run -d --rm -p 5000:80 niccokunzmann/open-web-calendar
Then, you should see your service running at http://localhost:5000.
Using pre build dockerhub image with docker-compose
version: '3'
services:
open-web-calendar:
image: niccokunzmann/open-web-calendar
ports:
- '80:80'
environment:
- WORKERS=4
restart: unless-stopped
To deploy the open-web-calendar with docker-compose, do the following steps:
docker-compose.yml
file to the directory from where you want to run the container.docker-compose up -d
to start the container.If you want to update your image with the latest version from dockerhub type docker-compose pull
Note: You need to start the container after pulling again in order for the update to apply (docker-compose up -d
)
You can create a fork of this repository which automatically deploys to Vercel:
Alternatively you can create a one off deploy by cloning this repository and running npx vercel
at the root.
Hosts
Sources/Libs
calendar ics service, ics calendar to html, open source calendar view ical, python Ical, calendar viewer website for ics, open source calendar website, embed calendar into website
virtualenv -p python3 ENV
source ENV/bin/activate
pip install -r requirements.txt
python3 app.py
For the configuration of the app through environment variables, see the app.json file.
To run the tests, we use tox
.
tox
tests all different Python versions which we want to
be compatible to.
pip install tox
Run all tests:
tox
Run a specific Python version:
tox -e py39
We use pip-compile
to guarantee a
tested deployment by fixing all
the dependencies to a specific
version.
You can update the packages to the latest version:
rm requirements.txt test-requirements.txt
pip install --upgrade pip-tools -r requirements.in -r test-requirements.in
pip-compile -o requirements.txt requirements.in
pip-compile -o test-requirements.txt test-requirements.in
And run the tests:
tox