diff --git a/docker/Dockerfile b/docker/Dockerfile index 2d647d2..bc5be79 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -15,7 +15,7 @@ WORKDIR /maap-api-nasa COPY pyproject.toml poetry.lock ./ RUN touch README.md -RUN poetry install --without dev && rm -rf $POETRY_CACHE_DIR +RUN poetry install --without dev --no-root && rm -rf $POETRY_CACHE_DIR FROM python:3.9-slim as runtime @@ -24,8 +24,12 @@ ENV VIRTUAL_ENV=/maap-api-nasa/.venv \ COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV} +RUN apt-get update \ + && apt-get install -y --no-install-recommends git python3-psycopg2 \ + && apt-get purge -y --auto-remove \ + && rm -rf /var/lib/apt/lists/* + COPY api /maap-api-nasa/api -COPY api/settings.py /maap-api-nasa/api/settings.py COPY logging.conf /maap-api-nasa/logging.conf RUN mkdir /logs diff --git a/docker/docker-compose-local.yml b/docker/docker-compose-local.yml index a3460aa..2409793 100644 --- a/docker/docker-compose-local.yml +++ b/docker/docker-compose-local.yml @@ -20,6 +20,7 @@ services: sh -c "flask run --host=0.0.0.0" environment: FLASK_APP: /maap-api-nasa/api/maapapp.py + DATABASE_URL: postgresql://maapuser:mysecretpassword@db/maap restart: always logging: driver: "json-file" diff --git a/pyproject.toml b/pyproject.toml index 1256c5c..34e76fa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,9 +5,6 @@ description = "NASA Python implementation of the MAAP API specification" authors = ["MAAP-Project Platform "] license = "Apache 2.0" readme = "README.md" -packages = [ - {include = "api"} -] [tool.poetry.dependencies] python = "^3.9.0"