Skip to content

Commit 2f46c1b

Browse files
authored
Merge pull request #5 from cisar2218/master
Django version bump to LTS (>=6.0)
2 parents e64ab7e + 4f5e484 commit 2f46c1b

3 files changed

Lines changed: 21 additions & 15 deletions

File tree

DOSPORTAL/settings.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/
2222

2323
# SECURITY WARNING: keep the secret key used in production secret!
24-
SECRET_KEY = 'django-insecure-)&9q7=6szljptu&2a11rq1k-ofhz1s$nxk&t+f=3xk74(vq4jq'
24+
SECRET_KEY = os.getenv('SECRET_KEY', 'django-insecure-)&9q7=6szljptu&2a11rq1k-ofhz1s$nxk&t+f=3xk74(vq4jq')
2525

2626
# SECURITY WARNING: don't run with debug turned on in production!
2727
DEBUG = True
@@ -115,11 +115,11 @@
115115
"default": {
116116
#"ENGINE": "django.db.backends.postgresql",
117117
"ENGINE": "django.contrib.gis.db.backends.postgis",
118-
"NAME": "dosportal",
119-
"USER": "dosportal_user",
120-
"PASSWORD": "dosportal_password",
121-
"HOST": "10.5.0.5",
122-
"PORT": "5432",
118+
"NAME": os.getenv("POSTGRES_DB", "dosportal"),
119+
"USER": os.getenv("POSTGRES_USER", "dosportal_user"),
120+
"PASSWORD": os.getenv("POSTGRES_PASSWORD", "dosportal_password"),
121+
"HOST": os.getenv("POSTGRES_HOST", "10.5.0.5"),
122+
"PORT": os.getenv("POSTGRES_PORT", "5432"),
123123
}
124124
}
125125

Dockerfile

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,24 @@
1-
FROM debian:latest
1+
FROM python:3.13-alpine
22

33
ENV PYTHONDONTWRITEBYTECODE=1
44
ENV PYTHONUNBUFFERED=1
55

6-
RUN apt-get update
7-
RUN apt-get install -y python3 python3-pip python3-setuptools libpq-dev binutils libproj-dev gdal-bin
8-
#RUN apt-get install -y net-tools
6+
RUN apk update
7+
RUN apk add --no-cache \
8+
postgresql-dev \
9+
gcc \
10+
g++ \
11+
musl-dev \
12+
linux-headers \
13+
binutils \
14+
proj-dev \
15+
gdal-dev \
16+
gdal
917

1018
WORKDIR /DOSPORTAL
1119
COPY requirements.txt /DOSPORTAL/
12-
RUN pip3 install -r requirements.txt --break-system-packages
20+
RUN pip install --no-cache-dir -r requirements.txt
1321
#COPY . /DOSPORTAL/
1422
#COPY cari7a /usr/local/bin/cari7a
1523

16-
ENTRYPOINT python3 manage.py runserver 0.0.0.0:8000
24+
ENTRYPOINT ["python", "manage.py", "runserver", "0.0.0.0:8000"]

requirements.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
django
2-
django-bootstrap-v5
1+
django>=6.0
32
psycopg2
43
matplotlib
54
#basemap
@@ -34,7 +33,6 @@ django-guardian
3433
django-gravatar2
3534
django-prettyjson
3635

37-
tables
3836
django-markdownx
3937

4038
markdown

0 commit comments

Comments
 (0)