Merge pull request #1242 from DavidVadnais/BUG-1230-postgresql-version-django-missmatch

BUG-1230 standalone postgresql v12-->v13
This commit is contained in:
Christopher Broderick 2025-03-11 18:42:09 +00:00 committed by GitHub
commit 3078f93b32
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 19 additions and 11 deletions

View File

@ -5,7 +5,7 @@ You can find standalone docker images at `djangohelpdesk/standalone:latest <http
You will also find an alternative `standalone-extras <https://hub.docker.com/r/djangohelpdesk/standalone-extras>`_ image with extra libraries needed to use the standalone image on cloud platforms such as AWS. You can find a full list of extra packages included in the extra's image `here <https://github.com/django-helpdesk/django-helpdesk/blob/main/standalone/requirements-extras.txt>`_. You will also find an alternative `standalone-extras <https://hub.docker.com/r/djangohelpdesk/standalone-extras>`_ image with extra libraries needed to use the standalone image on cloud platforms such as AWS. You can find a full list of extra packages included in the extra's image `here <https://github.com/django-helpdesk/django-helpdesk/blob/main/standalone/requirements-extras.txt>`_.
Installation using docker-compose Installation using docker compose
------------ ------------
1. Clone the django-helpdesk repository: 1. Clone the django-helpdesk repository:
@ -21,16 +21,22 @@ Installation using docker-compose
cd django-helpdesk/standalone cd django-helpdesk/standalone
3. Execute the installation script: 3. Execute the installation script:
.. code-block:: bash
./setup.sh
.. code-block:: bash
./setup.sh
Set the POSTGRES major version if you are deploying to an existing POSTGRES instance other than the default shown within the docker-compose file. For example:
.. code-block:: bash
export POSTGRES_MAJOR_VERSION=15
4. Start the services: 4. Start the services:
.. code-block:: bash .. code-block:: bash
docker-compose up docker compose up
Creating an Admin User Creating an Admin User

View File

@ -1,3 +1,4 @@
#see github workflows for docker build command
FROM python:3.11-slim-bullseye FROM python:3.11-slim-bullseye
LABEL src=https://github.com/django-helpdesk/django-helpdesk LABEL src=https://github.com/django-helpdesk/django-helpdesk
RUN apt-get update RUN apt-get update
@ -6,7 +7,10 @@ RUN apt-get install -yqq \
postgresql-client \ postgresql-client \
cron \ cron \
git git
COPY . /opt/
COPY django-helpdesk /opt/django-helpdesk
RUN pip3 install --upgrade pip
RUN pip3 install packaging
RUN pip3 install -r /opt/django-helpdesk/requirements.txt RUN pip3 install -r /opt/django-helpdesk/requirements.txt
RUN pip3 install -r /opt/django-helpdesk/standalone/requirements.txt RUN pip3 install -r /opt/django-helpdesk/standalone/requirements.txt
WORKDIR /opt/django-helpdesk WORKDIR /opt/django-helpdesk
@ -15,4 +19,4 @@ RUN DJANGO_HELPDESK_SECRET_KEY=foo python3 standalone/manage.py collectstatic
RUN echo "* * * * * root . /etc/env && /usr/local/bin/python3 /opt/django-helpdesk/standalone/manage.py get_email >> /var/log/cron.log 2>&1" > /etc/crontab RUN echo "* * * * * root . /etc/env && /usr/local/bin/python3 /opt/django-helpdesk/standalone/manage.py get_email >> /var/log/cron.log 2>&1" > /etc/crontab
RUN chmod 0644 /etc/crontab RUN chmod 0644 /etc/crontab
ENTRYPOINT sh /opt/django-helpdesk/standalone/entrypoint.sh ENTRYPOINT sh /opt/django-helpdesk/standalone/entrypoint.sh

View File

@ -1,5 +1,3 @@
version: '2'
# Define named volumes # Define named volumes
volumes: volumes:
caddy_data: caddy_data:
@ -30,7 +28,7 @@ services:
- postgres - postgres
postgres: postgres:
image: postgres:12-bullseye image: postgres:${POSTGRES_MAJOR_VERSION:-17}-bullseye
volumes: volumes:
- postgres_data:/var/lib/postgresql/data - postgres_data:/var/lib/postgresql/data
env_file: docker.env env_file: docker.env