CntoDev / cnto-wp-website

A private repo to track progress on the new CNTO website draft
0 stars 0 forks source link

Configure basic WordPress instance on `tools` server #21

Closed enrico-ghidoni closed 3 years ago

enrico-ghidoni commented 3 years ago

Start the deployment of a barebone WordPress instance on the tools server to resume work on the project after backup failure.

milivojm commented 3 years ago

@enrico-ghidoni on docker? ;)

enrico-ghidoni commented 3 years ago

@milivojm that would make me a bit happier security-wise... I guess it's doable https://hub.docker.com/_/wordpress

enrico-ghidoni commented 3 years ago

Task list for completing the issue:

@JamesTheClarke I'm not sure this will be done before CntoDev/ideas#12 and to avoid repetition of the loss you experienced last month I suggest waiting for it to be completed, so we can be sure nothing gets lost again and we (you) do not need to start over for a third time.

JamesTheClarke commented 3 years ago

Yeah, this matches with what I discussed with @milivojm . We agreed I won't be working on a second local version which may not be portable so I'll wait till WP is setup to basic installation level whereas I can start working via the CMS/Dashboard.

Question: will the tools WP setup include a backup / rollback feature in case a test plugin somehow corrupts our DB? It's rare but it can still happen.

EDIT: maybe we should consider documenting the tools server WP setup on the wiki of this GitHub Repository: https://github.com/CntoDev/cnto-wp-website/wiki

enrico-ghidoni commented 3 years ago

The backup that is planned is a machine backup, so no rollback would be available for WordPress specifically. We can look into incremental backups of both the WordPress files and the MySQL DBMS. That is unless WordPress already has a tool to execute rollbacks.

The issue with deploying WordPress on Docker is that it's slightly harder to manage the filesystem according to our needs (manual plugin installation or specific backup policies for directories). What do you think @milivojm? Deploying with Docker is certainly quicker and more easily portable, but it comes at the cost of little configuration possible without spending some time configuring the image, at which point we'd lose the speed in setting it up.

For the documentation part, once deployment is complete I'll update a section on the project Wiki page.

milivojm commented 3 years ago

What extra image configuration steps are needed?

enrico-ghidoni commented 3 years ago

If the container hosting WordPress needs certain tools or software in addition to what is packed in the standard image, we need to define our own image. Which is no big issue really, it just adds a bit of complexity. My biggest concern is the need to install manual plugins into WordPress, for which we'd need to modify the wordpress directory that the container uses as reference volume. Again, it's totally possible I just want to make sure we don't block ourselves in a difficult situation if we need something in the future. I'm also okay with setting up the containers for testing and see how it goes.

milivojm commented 3 years ago

Let's be pragmatic here and deploy on barebone.

enrico-ghidoni commented 3 years ago

Since this involves more than R&D branch I'd like the topic to be discussed with @JamesTheClarke as well. Perhaps R&D March Monthly Meeting would be a good idea.

Didr commented 3 years ago

If the container hosting WordPress needs certain tools or software in addition to what is packed in the standard image, we need to define our own image. Which is no big issue really, it just adds a bit of complexity. My biggest concern is the need to install manual plugins into WordPress, for which we'd need to modify the wordpress directory that the container uses as reference volume. Again, it's totally possible I just want to make sure we don't block ourselves in a difficult situation if we need something in the future. I'm also okay with setting up the containers for testing and see how it goes.

I see no issue with mounting a volume for persistence. Bitnami who runs one of the more popular Wordpress images recommends it: https://github.com/bitnami/bitnami-docker-wordpress#persisting-your-application With the Wordpress directory mounted, I don't see more difficulty in using the Docker variant than deploying it on bare metal.

Task list for completing the issue:

Looks good! I'm happy to help with all the tasks here.

enrico-ghidoni commented 3 years ago

You are absolutely right. That's my Docker boy! Just saved us a PHP installation. Also @Didr if you want to take the task on yourself feel free to do so :)

enrico-ghidoni commented 3 years ago

Requirements updated for using new domain and setting up authentication requirements. Waiting for @Didr to gain access to the server then the task can proceed.

Didr commented 3 years ago

This was setup and sent to Clarke on the 24th of March.

All that remains is adding cnto-arma.com to Cloudflare.

enrico-ghidoni commented 3 years ago

Do we have the certificate already?

Didr commented 3 years ago

Do we have the certificate already?

I'm (lazily) relying on Cloudflare for the certificate. If we encounter any issues due to that I'll fix a letsencrypt cert too.

enrico-ghidoni commented 3 years ago

Good! I'll tick it off our list

enrico-ghidoni commented 3 years ago

@Didr can I close this? The one thing missing was linking WP to @JamesTheClarke's domain

Didr commented 3 years ago

@Didr can I close this? The one thing missing was linking WP to @JamesTheClarke's domain

Go ahead.