Add dockerfile #2
4 changed files with 36 additions and 3 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal file
|
@ -0,0 +1,17 @@
|
|||
FROM python:3.6.12-alpine3.12
|
||||
WORKDIR /usr/src/ics
|
||||
|
||||
# Copy the actual folder and install dependencies
|
||||
|
||||
COPY . ./
|
||||
RUN pip3 install -r requirements.txt
|
||||
|
||||
# Mount the config volume
|
||||
|
||||
RUN mkdir /usr/src/ics/app/config
|
||||
VOLUME [ "/usr/src/ics/app/config" ]
|
||||
|
||||
EXPOSE 8088
|
||||
|
||||
CMD ["python3", "./app/server.py"]
|
||||
|
16
README.md
16
README.md
|
@ -7,6 +7,22 @@ ICS Fusion is written in Python and using `Flask` to provide the HTTP endpoint.
|
|||
|
||||
Launch the `app/server.py` file to start the application.
|
||||
|
||||
### Building the image
|
||||
ICS Fusion can be built as a Docker image. To do so, type :
|
||||
|
||||
`docker build --tag ics-fusion:1.0 .`
|
||||
|
||||
in the main folder of Fusion ICS.
|
||||
|
||||
### Running the container
|
||||
To run the container, type:
|
||||
|
||||
`docker run --publish PORT:8088 --detach --name ics --volume DIRECTORY:/usr/src/ics/app/config ics-fusion:1.0`
|
||||
|
||||
Where:
|
||||
* `PORT` is the port you want to expose on your host machine.
|
||||
* `DIRECTORY` is the path to your config directory.
|
||||
|
||||
## Configuration
|
||||
To create a new feed in the application, create a file with the `.json` extension in the `app/config` folder. The name of the configuration file will be used to create a new endpoint to serve the feed.
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
from flask import Flask, make_response
|
||||
|
||||
from app.tools.caching import CacheThread
|
||||
from app.tools.tools import *
|
||||
from tools.caching import CacheThread
|
||||
from tools.tools import *
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
|
|
|
@ -77,7 +77,7 @@ from typing import List
|
|||
|
||||
from ics import Calendar
|
||||
from pathvalidate import sanitize_filename
|
||||
from app.tools.caching import load_cal
|
||||
from tools.caching import load_cal
|
||||
|
||||
|
||||
def filtering(cal: Calendar, filters: dict, field_name: str) -> Calendar:
|
||||
|
|
Loading…
Add table
Reference in a new issue