Commit graph

5,266 commits

Author SHA1 Message Date
fbc6c215ae Seed production-like content, and only into a database without page content 2026-09-30 16:35:15 +03:00
691863b78e Keep required settings strict and supply their dev values in .env.docker 2026-09-30 16:35:15 +03:00
31fe762077 Seed each site's pages with the CMS template it uses in production 2026-09-30 16:14:54 +03:00
748000afd9 Avoid nested hostnames when /dev-sites/ is opened on a site address 2026-09-30 16:03:37 +03:00
4379e9fb89 Disable caching and report the chosen site in dev responses
Adds Cache-Control: no-store and an X-Dev-Site header to the dev site
switcher so a browser cannot reuse another site's page or redirect, and
the selected site is visible in dev tools.
2026-09-30 15:52:54 +03:00
8874fe4298 Update docker guide for per-site hostnames and richer dummy data 2026-09-30 15:44:43 +03:00
e77a17b82f Seed richer dummy data with a fixed admin login
Each site gets a home page and four child pages, and there are twelve
dummy customers. The dummy admin password is now fixed through
DUMMY_ADMIN_PASSWORD. --purge removes all of it.
2026-09-30 15:44:43 +03:00
63c17a6cdf Choose the dev site from the hostname so tabs stay independent
The cookie is shared by all tabs and redirects dropped ?site=, so opening
several sites made them all show the last one. The site is now taken from
<domain>.<anything> hosts (each site its own origin), with ?site= and the
cookie as fallback, and redirects keep ?site=. /dev-sites/ links use the
per-site hostnames, via sslip.io when accessed by IP.
2026-09-30 15:44:43 +03:00
39ba7e5f21 Document dummy data in the docker guide 2026-09-30 15:33:02 +03:00
d6653400c6 Add optional dummy data seeding on start
The seed_dummy_data command creates one CMS page per site and a dummy
admin and customer, idempotently. --purge removes exactly what it
created. It runs on start when SEED_DUMMY_DATA=True and a failure does
not stop the web server.
2026-09-30 15:33:02 +03:00
17bf42c895 Read the secret key from the persisted key file when unset
docker compose exec skips the entrypoint, so commands run that way had no
DJANGO_SECRET_KEY. Fall back to the file the entrypoint writes.
2026-09-30 15:33:02 +03:00
fc4532e89b Add guide for running the docker compose stack 2026-09-30 14:54:38 +03:00
d4d3884d7c Add dev site switcher for testing every site from one host
With DEBUG on, ?site=<domain> selects the site without DNS or hosts
entries and is remembered in a cookie. /dev-sites/ lists all
configured sites as links.
2026-09-30 14:54:38 +03:00
619a20394e Add docker compose stack for test deployments
Runs postgres, redis, the web app and a celery worker. Dev defaults live
in .env.docker with an optional .env override. The entrypoint generates
and persists the Django secret key and waits for postgres; the web
service migrates and creates a Site row for every configured domain.
SQL dumps placed in db-init/ are restored on first start and are
git-ignored.
2026-09-30 14:54:38 +03:00
7fdd70022b Make the djangocms_blog column rename conditional
Databases created from scratch already have customuser_id, so the
unconditional rename failed on them.
2026-09-30 14:54:38 +03:00
3c9102167d Make settings tolerate missing environment values
env() accepts a default and treats empty values as unset. Values that
crashed startup when absent now fall back to safe defaults.
2026-09-30 14:54:38 +03:00
fdaf8a18a2 Fix Docker image build
Stop the libldap linker workaround from overwriting the real shared
library, and add the missing django-recaptcha requirement.
2026-09-30 14:54:38 +03:00
e4c50ca785 ha 2026-09-30 13:42:43 +03:00
PCoder
9cdf4593cf Remove hardcode 2025-05-27 12:02:15 +05:30
PCoder
f8ba89c193 Fix params passing to method 2025-05-27 11:47:48 +05:30
PCoder
018c3b5bba More debugging 2025-05-27 10:58:33 +05:30
PCoder
4e978f62ea More debug 2025-05-27 10:47:06 +05:30
PCoder
4c0a1fd07f Debug 2025-05-27 10:08:09 +05:30
PCoder
2ec89b6157 Print provisioning parameters 2025-05-21 15:23:13 +05:30
PCoder
8ffa2d9c3c Replace more f-strings 2025-05-21 11:27:22 +05:30
PCoder
b6239159b2 Remove f-strings to make things compatible 2025-05-21 11:17:15 +05:30
PCoder
60ddfa78b0 Handle getting the correct user_card_detail
Fixes

Traceback (most recent call last):
  File "<console>", line 2, in <module>
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/db/models/manager.py", line 122, in manager_method
    return getattr(self.get_queryset(), name)(*args, **kwargs)
  File "/home/app/pyvenv/lib/python3.5/site-packages/django/db/models/query.py", line 391, in get
    (self.model._meta.object_name, num)
hosting.models.MultipleObjectsReturned: get() returned more than one UserCardDetail -- it returned 2!
2025-05-16 16:05:53 +05:30
PCoder
fc1dc37840 Update .gitignore 2025-03-29 12:55:17 +05:30
PCoder
ca099d8c83 Send error message only if there is an error 2025-03-27 16:21:33 +05:30
PCoder
8e9315b12d Fix separate messages for errors and inform admin about errors 2025-03-27 16:13:22 +05:30
PCoder
86836f3d1e Check those VMs that are displayed to the public 2025-03-27 15:39:24 +05:30
app@dynamicweb-production
94a9ac3147 Add change_fi_vatrate_2024.py management command 2024-09-26 11:13:56 +02:00
app@dynamicweb-production
3736f522dd Debug messages 2024-06-20 14:00:50 +02:00
app@dynamicweb-production
4f8bd3b45f Fix stripe_chgs object; make it consistent 2024-06-20 13:58:19 +02:00
app@dynamicweb-production
92cfe71bbe Fix invoices list not showing one time charges 2024-05-08 09:57:56 +02:00
97d70cc5fd Merge pull request '12334-generic-products-name-in-invoice' (#18) from 12334-generic-products-name-in-invoice into master
Reviewed-on: ungleich-public/dynamicweb#18
2024-03-22 11:25:49 +00:00
PCoder
c4f6780a0e Add management command fix_generic_stripe_plan_product_names.py 2024-03-22 16:54:54 +05:30
0679a47eea Merge branch 'master' into 12334-generic-products-name-in-invoice 2024-03-21 02:42:56 +00:00
Nico Schottelius
8b08357d05 entrypoint: make executable 2024-02-20 17:19:05 +09:00
Nico Schottelius
8b06c2c6e9 docker: add entrypoint and add support for dynamic config 2024-02-20 17:18:29 +09:00
Nico Schottelius
26f3a1881d make build image only push if push is specified 2024-02-20 16:25:13 +09:00
dee2b1a90c Merge pull request 'make-docker-build-succesful' (#19) from make-docker-build-succesful into master
Reviewed-on: ungleich-public/dynamicweb#19
2024-02-20 01:06:22 +00:00
PCoder
9e98125b13 Use the same django-filer version being used on production 2024-02-19 20:50:36 +05:30
PCoder
8d13629c8b Use proper library path for Pillow 2024-02-19 20:49:29 +05:30
PCoder
b6ff2b62c1 Add comment for alpine 3.14 requirement 2024-02-19 20:44:17 +05:30
PCoder
893c816846 Add apks required for the build on alpine 3.12 2024-02-19 20:43:41 +05:30
PCoder
f178be8395 Update .dockerignore: ignore .env 2024-02-19 20:42:34 +05:30
Nico Schottelius
0d7f10776c [docker] push if build is ok 2024-02-17 20:49:31 +09:00
Nico Schottelius
4eb470df16 [docker] switch to python 3.5 2024-02-17 20:48:17 +09:00
app@dynamicweb-production
6262432b7a Merge remote-tracking branch 'ungleich/master' 2024-02-17 11:21:58 +01:00