mysociety / writetothem

Write to your MP, MEP, & other elected representatives.
https://www.writetothem.com
Other
54 stars 11 forks source link

First pass at a development environment #464

Closed sagepe closed 2 years ago

sagepe commented 3 years ago

Adds an initial development environment based on Docker Compose that should be good enough for most front-end changes.

zarino commented 3 years ago

Just tried this out. Searched for my postcode from the homepage, got this error:

Screenshot_2021-02-09 WriteToThem

Just me?

dracos commented 3 years ago

It doesn't handle anything past display, I'm afraid, there's no connection to a backend system containing rep information.

sagepe commented 3 years ago

Yes, as per @dracos comment this is just an initial environment hopefully good enough for most front-end changes (see this commit message).

I'd like to get it working beyond this at some stage, but didn't want to block @wrightmartin's contact page task while getting a load of back-end stuff working.

The quickest way to get a more fully functional system may be to look at running it on the VPN so it can access the internal services; we'd still need a daemon container and one or two other bits, but that might be the quickest win.

zarino commented 3 years ago

No worries! 👍

dracos commented 3 years ago

Or for now you could just put those three in a conf.d ini file inside /etc/php..., would that have the same effect?

sagepe commented 3 years ago

Do we need the giant php.ini file?

No, you are right. We simply need short_open_tag for Stretch; I was experimenting with Buster at one stage, which is where the E-NOTICE change came in as our code generates a few of these and things weren't loading right. We can revisit this later. I think must be where the mail.add_x_header crept in, too, I didn't change this myself - it must have come from a different source file.

the first we could sort in the repo ... Or for now you could just put those three in a conf.d ini file inside /etc/php...

I've done the latter for now, although the former is probably something we should do in due course.

sagepe commented 2 years ago

I think we can merge this, I know it would be ideal to get a backend bit working but as noted it should be OK for front-end changes.