dynamic-frontend
Pete Ley 2 months ago
parent 243e4c2d56
commit eac5cfdaf9

@ -1,27 +1,29 @@
FROM python:3.11.6-slim-bookworm
RUN useradd dwgstatus
FROM python:3.11-alpine
RUN addgroup -S dwgstatus && adduser -S dwgstatus -G dwgstatus
EXPOSE 8000
ENV PYTHONUNBUFFERED=1 \
PORT=8000
RUN apt update && apt install -y --no-install-recommends \
make \
build-essential \
gcc \
libtool \
autoconf \
automake \
wget \
curl \
texinfo
RUN wget https://github.com/LibreDWG/libredwg/archive/refs/tags/0.12.5.6932.tar.gz
RUN tar -xf 0.12.5.6932.tar.gz
WORKDIR /libredwg-0.12.5.6932
RUN autoreconf --install --symlink "$@" -I m4
RUN curl https://raw.githubusercontent.com/zserge/jsmn/master/jsmn.h -o jsmn/jsmn.h
RUN ./configure --disable-write --disable-bindings
RUN make
RUN make install
RUN ldconfig
RUN apk add postgresql16-client
# RUN apt update && apt install -y --no-install-recommends \
# make \
# build-essential \
# gcc \
# libtool \
# autoconf \
# automake \
# wget \
# curl \
# texinfo \
# postgresql-client
# RUN wget https://github.com/LibreDWG/libredwg/archive/refs/tags/0.13.3.tar.gz
# RUN tar -xf 0.13.3.tar.gz
# WORKDIR /libredwg-0.13.3
# RUN autoreconf --install --symlink "$@" -I m4
# RUN curl https://raw.githubusercontent.com/zserge/jsmn/master/jsmn.h -o jsmn/jsmn.h
# RUN ./configure --disable-write --disable-bindings
# RUN make
# RUN make install
# RUN ldconfig
RUN pip install "gunicorn"
COPY requirements.txt /
RUN pip install -r /requirements.txt

@ -5,6 +5,7 @@ services:
- .:/app
- /mnt/p:/mnt/p
- /mnt/s:/mnt/s
- /mnt/s/Dev/dwgstatus-backups:/backups
depends_on:
- db
restart: always
@ -18,7 +19,6 @@ services:
restart: always
ports:
- 8000:80
- 80:80
volumes:
- ./nginx:/etc/nginx/conf.d
- ./static:/static

@ -25,11 +25,12 @@ SECRET_KEY = "django-insecure-%q_1-ql04zin3dy32cx@gtj_)onxaa1fm9wvvmf+2qhwyz4_&r
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
ALLOWED_HOSTS = ['dwgstatus', '127.0.0.1', 'localhost', '10.10.48.73']
ALLOWED_HOSTS = ['dwgstatus', '127.0.0.1', 'localhost', 'localhost:8000', '10.10.48.73']
# Application definition
INSTALLED_APPS = [
'dbbackup',
'django_bootstrap5',
'jobs',
'phonenumber_field',
@ -53,7 +54,7 @@ MIDDLEWARE = [
"django.middleware.clickjacking.XFrameOptionsMiddleware",
]
CSRF_TRUSTED_ORIGINS = ['http://dwgstatus']
CSRF_TRUSTED_ORIGINS = ['http://dwgstatus', 'http://localhost', 'http://localhost:8000']
ROOT_URLCONF = "dwgstatus.urls"
@ -152,3 +153,7 @@ DETAIL_PATH = '/mnt/s'
LOGIN_REDIRECT_URL = '/'
PHONENUMBER_DEFAULT_REGION = 'US'
DBBACKUP_STORAGE = 'django.core.files.storage.FileSystemStorage'
DBBACKUP_STORAGE_OPTIONS = {'location': '/backups/'}
DBBACKUP_FILENAME_TEMPLATE = '{datetime}.{extension}'

@ -1,14 +1,14 @@
asgiref==3.7.2
Django==4.2.4
django-bootstrap5==23.3
django-extensions==3.2.3
django-phonenumber-field==7.1.0
localflavor==1.9
phonenumberslite==8.13.22
Django==4.2.10
django-bootstrap5==23.4
django-dbbackup==4.1.0
postgres==4.0
psycopg2-binary==2.9.9
psycopg2-pool==1.1
pymemcache==4.0.0
six==1.16.0
psycopg2-pool==1.2
pytz==2024.1
sqlparse==0.4.4
typing-extensions==4.7.1
typing-extensions==4.9.0

Loading…
Cancel
Save