diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..1cfda87 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.9-lite +WORKDIR /code +COPY ./requirements.txt /code/requirements.txt +RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt +COPY ./app /code/app +CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0"] diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..e984a30 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,19 @@ +version: "3.9" +services: + api: + container_name: gmd-api + restart: always + build: + dockerfile: Dockerfile + volumes: + - ./blobs:/code/blobs + - ./config.json:/code/config.json + networks: + - web + labels: + - "traefik.enable=true" + - "traefik.http.routers.gckmaps.rule=Host(`gckmaps.hipstercat.fr`)" + - "traefik.http.routers.gckmaps.entrypoints=websecure" +networks: + web: + external: true \ No newline at end of file