Skip to content

Commit

Permalink
Fix Docker image for debugging.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanPaul committed Oct 22, 2024
1 parent 11f6787 commit 79d6345
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,16 @@ RUN export DEBIAN_FRONTEND=noninteractive \
&& ([ "$ENVIRONMENT" = "deployment" ] || \
apt-get install -y --no-install-recommends \
proj-bin) \
&& apt-get upgrade -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /var/dpkg/* /var/tmp/* /var/log/dpkg.log

# Add login-script for UID/GID-remapping.
COPY --chown=root:root --link docker/files/remap-user.sh /usr/local/bin/remap-user.sh

# Copy source code and install it
WORKDIR /code
COPY . /code
WORKDIR /src
COPY . /src

## Only install pydev requirements if arg PYDEV_DEBUG is set to 'yes'
ARG PYDEV_DEBUG="no"
Expand All @@ -62,7 +63,7 @@ RUN EXTRAS=$([ "$ENVIRONMENT" = "deployment" ] || echo ",test") && \
python3 -m pip --disable-pip-version-check install --no-cache-dir .[dev] --break-system-packages) && \
python3 -m pip freeze && \
([ "$ENVIRONMENT" != "deployment" ] || \
(rm -rf /code/* /code/.git* && \
(rm -rf /src/* /src/.git* && \
apt-get purge -y \
git \
git-man \
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ services:
# Enable Metrics
prometheus_multiproc_dir: ${prometheus_multiproc_dir}
# Dev flags
FLASK_APP: /code/datacube_ows/ogc.py
FLASK_APP: /src/datacube_ows/ogc.py
FLASK_ENV: ${FLASK_ENV}
PYDEV_DEBUG: "${PYDEV_DEBUG}"
SENTRY_DSN: "${SENTRY_DSN}"
volumes:
- ${OWS_CFG_DIR}:${OWS_CFG_MOUNT_DIR}
- ./:/code/
- ./:/src/
- ./artifacts:/mnt/artifacts
restart: always
command: ["flask", "run", "--host=0.0.0.0", "--port=8000"]
10 changes: 4 additions & 6 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This file is part of datacube-ows, part of the Open Data Cube project.
# See https://opendatacube.org for more information.
#
# Copyright (c) 2017-2023 OWS Contributors
# Copyright (c) 2017-2024 OWS Contributors
# SPDX-License-Identifier: Apache-2.0

from setuptools import find_packages, setup
Expand Down Expand Up @@ -49,11 +49,9 @@
]

dev_requirements = [
'pydevd-pycharm~=221.5921.27', # For Pycharm 2022.1.3
'pylint==3.2.3',
'pydevd-pycharm~=242.23339.19', # For Pycharm 2024.2.3
'pylint',
'sphinx_click',
'pre-commit==2.13.0',
'pipdeptree'
]

operational_requirements = [
Expand Down Expand Up @@ -115,7 +113,7 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.8',
],
setup_requires=setup_requirements,
use_scm_version={
Expand Down

0 comments on commit 79d6345

Please sign in to comment.