diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..35e2e37 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,2 @@ +.git/* +GTFS/**/*.txt \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..23d67fb --- /dev/null +++ b/Dockerfile @@ -0,0 +1,14 @@ +FROM python:3.6-slim-stretch + +RUN apt-get update && apt-get -y upgrade && \ + apt-get install -y python3-pip \ + && rm -rf /var/lib/apt/lists/* + +RUN pip3 install pandas tornado xmltodict tinydb pycryptodomex --user --no-cache-dir +RUN mkdir -p /app +WORKDIR /app +COPY . /app/ + +EXPOSE 5000 + +CMD cd /app/ && python3 GTFSManager.py \ No newline at end of file diff --git a/README.md b/README.md index 6dd0d37..7d09f1a 100644 --- a/README.md +++ b/README.md @@ -56,6 +56,11 @@ See on the project wiki: [Running on Ubuntu OS](https://github.com/WRI-Cities/st ### Running with Python3 on a Windows OS See on the project wiki: [Running on Windows OS with Python 3](https://github.com/WRI-Cities/static-GTFS-manager/wiki/Running-on-Windows-OS-with-Python-3) +### Running in Docker with Compose +Check out the repo and run + + docker-compose up + ---- ## Changing the password diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..811ff4a --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' +services: + static-gtfs-manager: + ports: + - '5000:5000' + image: laidig/static-gtfs-manager + volumes: + - GTFS:/app/GTFS/ + +volumes: + GTFS: \ No newline at end of file