Skip to content

Commit

Permalink
0.1.7 fix docker file with pythonpath
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Jan 20, 2022
1 parent a801a3d commit 2e56730
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
FROM python:3.9-slim-buster

COPY . /app
# copy files over
COPY ./src /app/src
COPY ./requirements.txt /app/requirements.txt

# set working directory
WORKDIR /app

RUN export PYTHONPATH=$PYTHONPATH:./src

# install requirements
RUN pip install -U pip
RUN pip install -r requirements.txt

# make sure 'src' is in python path - this is so imports work
ENV PYTHONPATH=${PYTHONPATH}:/app/src
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ services:
# build:
# context: .
# dockerfile: Dockerfile
image: openclimatefix/nowcasting_api:0.1.5
image: openclimatefix/nowcasting_api:0.1.7
container_name: nowcasting_api
command: ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "80"]
ports:
Expand Down
2 changes: 1 addition & 1 deletion src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

logger = logging.getLogger(__name__)

version = "0.1.6"
version = "0.1.7"
description = """
The Nowcasting API is still under development. It only returns zeros for now.
"""
Expand Down

0 comments on commit 2e56730

Please sign in to comment.