File tree Expand file tree Collapse file tree 5 files changed +38
-8
lines changed
Expand file tree Collapse file tree 5 files changed +38
-8
lines changed Original file line number Diff line number Diff line change 11FROM mcr.microsoft.com/devcontainers/python:3.13
22
3- # Install dependency to make bash completion work with invoke
4- RUN apt-get update && \
5- export DEBIAN_FRONTEND=noninteractive && \
6- apt-get install -y bash-completion && \
7- apt-get clean && \
8- rm -rf /var/lib/apt/lists/*
3+ USER root
4+
5+ # Install system dependencies
6+ # - bash-completion for shell completions of invoke
7+ # - gettext for Django translations
8+ # - postgresql-common for the apt.postgresql.org.sh script
9+ # - postgresql-client-17 for a current version of psql
10+ RUN sudo apt-get update \
11+ && export DEBIAN_FRONTEND=noninteractive \
12+ && apt-get install -y --no-install-recommends \
13+ bash-completion \
14+ gettext \
15+ postgresql-common \
16+ && /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y \
17+ && apt-get install -y --no-install-recommends \
18+ postgresql-client-17 \
19+ && apt-get clean \
20+ && rm -rf /var/lib/apt/lists/*
921
1022USER vscode
1123
Original file line number Diff line number Diff line change 1616import environ
1717from pydicom import config as pydicom_config
1818
19+ # During development and calling `manage.py` from the host most environment variables are
20+ # set using the `.env` file (see `manage.py`). But some variables are only used in the Docker
21+ # compose setup, so we need to provide defaults here.
1922env = environ .Env ()
23+ llamacpp_dev_port = env .int ("LLAMACPP_DEV_PORT" )
24+ postgres_dev_port = env .int ("POSTGRES_DEV_PORT" )
25+ env = environ .Env (
26+ DATABASE_URL = (str , f"postgres://postgres:postgres@localhost:{ postgres_dev_port } /postgres" ),
27+ DBBACKUP_STORAGE_LOCATION = (str , "/temp/backups-radis" ),
28+ LLAMACPP_URL = (str , f"http://localhost:{ llamacpp_dev_port } " ),
29+ )
2030
2131# The base directory of the project (the root of the repository)
2232BASE_DIR = Path (__file__ ).resolve (strict = True ).parent .parent .parent
Original file line number Diff line number Diff line change @@ -64,6 +64,8 @@ services:
6464 postgres :
6565 environment :
6666 POSTGRES_PASSWORD : postgres
67+ ports :
68+ - " ${POSTGRES_DEV_PORT:-5432}:5432"
6769
6870volumes :
6971 vscode-server :
Original file line number Diff line number Diff line change 22# Use 'development' for local development, and 'production' in production.
33ENVIRONMENT = development
44
5- # The host port that will be mapped to the development server (only used in development).
5+ # Ports that will be mapped to the host during development.
6+ POSTGRES_DEV_PORT = 5432
7+ LLAMACPP_DEV_PORT = 8080
68WEB_DEV_PORT = 8000
79
8- # The host ports that will be mapped to the production server (only used in production) .
10+ # Ports that will be mapped to the host during production.
911WEB_HTTP_PORT = 80
1012WEB_HTTPS_PORT = 443
1113
Original file line number Diff line number Diff line change 44import os
55import sys
66
7+ from dotenv import load_dotenv
8+
9+ load_dotenv ()
10+
711
812def initialize_debugger ():
913 """Enable remote debugging."""
You can’t perform that action at this time.
0 commit comments