diff --git a/standalone/.dockerignore b/standalone/.dockerignore new file mode 100755 index 00000000..19e01807 --- /dev/null +++ b/standalone/.dockerignore @@ -0,0 +1 @@ +db/ diff --git a/standalone/Caddyfile b/standalone/Caddyfile index 87a1008e..7e8ae74f 100644 --- a/standalone/Caddyfile +++ b/standalone/Caddyfile @@ -1,3 +1,3 @@ localhost { - reverse_proxy django-helpdesk:8000 + reverse_proxy django-helpdesk:8080 } diff --git a/standalone/Dockerfile b/standalone/Dockerfile index 002a5830..89653db9 100644 --- a/standalone/Dockerfile +++ b/standalone/Dockerfile @@ -7,9 +7,9 @@ RUN apt-get install -yqq \ cron \ git COPY requirements.txt /opt/django-helpdesk/requirements.txt -COPY standalone/extra-requirements.txt /opt/django-helpdesk/standalone/extra-requirements.txt +COPY standalone/requirements.txt /opt/django-helpdesk/standalone/requirements.txt RUN pip3 install -r /opt/django-helpdesk/requirements.txt -RUN pip3 install -r /opt/django-helpdesk/standalone/extra-requirements.txt +RUN pip3 install -r /opt/django-helpdesk/standalone/requirements.txt COPY . /opt/django-helpdesk WORKDIR /opt/django-helpdesk RUN pip3 install -e . diff --git a/standalone/docker-compose-dev.yml b/standalone/docker-compose-dev.yml new file mode 100644 index 00000000..5e35f3dd --- /dev/null +++ b/standalone/docker-compose-dev.yml @@ -0,0 +1,30 @@ +version: '2' +services: + caddy: + image: caddy:2 + restart: unless-stopped + volumes: + - /tmp/data/caddy/data:/data + - /tmp/data/caddy/config:/config + - ./Caddyfile:/etc/caddy/Caddyfile:r + ports: + - "80:80" + - "443:443" + + django-helpdesk: + build: + context: .. + dockerfile: standalone/Dockerfile + user: root + volumes: + - /tmp/django-helpdesk-data:/data/ + - ./custom_navigation_header.html:/opt/django-helpdesk/helpdesk/templates/helpdesk/custom_navigation_header.html:r + env_file: docker.env + depends_on: + - postgres + + postgres: + image: postgres:12-bullseye + volumes: + - ./db:/var/lib/postgresql/data + env_file: docker.env diff --git a/standalone/docker-compose.yml b/standalone/docker-compose.yml index 5e35f3dd..2c2d2e4a 100644 --- a/standalone/docker-compose.yml +++ b/standalone/docker-compose.yml @@ -12,9 +12,7 @@ services: - "443:443" django-helpdesk: - build: - context: .. - dockerfile: standalone/Dockerfile + image: djangohelpdesk/standalone user: root volumes: - /tmp/django-helpdesk-data:/data/ diff --git a/standalone/extra-requirements.txt b/standalone/extra-requirements.txt index a4961749..e69de29b 100644 --- a/standalone/extra-requirements.txt +++ b/standalone/extra-requirements.txt @@ -1,3 +0,0 @@ -whitenoise -gunicorn -psycopg2-binary diff --git a/standalone/requirements.txt b/standalone/requirements.txt new file mode 100644 index 00000000..a4961749 --- /dev/null +++ b/standalone/requirements.txt @@ -0,0 +1,3 @@ +whitenoise +gunicorn +psycopg2-binary