From 5d5aacc9aa27cd3dd268a44124b82392ed729f44 Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Wed, 2 Jul 2025 20:15:14 +0100 Subject: [PATCH] Add daily email --- content/meta/index.json | 7 ++ ....c7e013f4-a712-4566-9e6e-6a4b1f580e30.json | 97 +++++++++++++++++++ ....3f83b9fb-dd35-4335-9496-2a8a99d281ec.json | 27 ++++++ 3 files changed, 131 insertions(+) create mode 100644 content/node.c7e013f4-a712-4566-9e6e-6a4b1f580e30.json create mode 100644 content/path_alias.3f83b9fb-dd35-4335-9496-2a8a99d281ec.json diff --git a/content/meta/index.json b/content/meta/index.json index 03a37b305..d8eedaa35 100644 --- a/content/meta/index.json +++ b/content/meta/index.json @@ -6611,5 +6611,12 @@ ], "node.871b8bdf-2856-4c27-be38-117dbec6dd94": [ "user.b8966985-d4b2-42a7-a319-2e94ccfbb849" + ], + "node.c7e013f4-a712-4566-9e6e-6a4b1f580e30": [ + "user.b8966985-d4b2-42a7-a319-2e94ccfbb849", + "node.c74de3cf-5362-4d08-935a-a9d0d22fcb94" + ], + "path_alias.3f83b9fb-dd35-4335-9496-2a8a99d281ec": [ + "node.c7e013f4-a712-4566-9e6e-6a4b1f580e30" ] } \ No newline at end of file diff --git a/content/node.c7e013f4-a712-4566-9e6e-6a4b1f580e30.json b/content/node.c7e013f4-a712-4566-9e6e-6a4b1f580e30.json new file mode 100644 index 000000000..655f36335 --- /dev/null +++ b/content/node.c7e013f4-a712-4566-9e6e-6a4b1f580e30.json @@ -0,0 +1,97 @@ +{ + "uuid": [ + { + "value": "c7e013f4-a712-4566-9e6e-6a4b1f580e30" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "type": [ + { + "target_id": "daily_email", + "target_type": "node_type", + "target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7" + } + ], + "revision_timestamp": [ + { + "value": "2025-07-02T19:14:30+00:00" + } + ], + "revision_uid": [ + { + "target_type": "user", + "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" + } + ], + "revision_log": [], + "status": [ + { + "value": true + } + ], + "uid": [ + { + "target_type": "user", + "target_uuid": "b8966985-d4b2-42a7-a319-2e94ccfbb849" + } + ], + "title": [ + { + "value": "Managing services without NixOS" + } + ], + "created": [ + { + "value": "2025-06-30T19:10:50+00:00" + } + ], + "changed": [ + { + "value": "2025-07-02T19:14:30+00:00" + } + ], + "promote": [ + { + "value": false + } + ], + "sticky": [ + { + "value": false + } + ], + "default_langcode": [ + { + "value": true + } + ], + "revision_translation_affected": [ + { + "value": true + } + ], + "path": [ + { + "alias": "\/daily\/2025\/06\/30\/managing-services-without-nixos", + "langcode": "en" + } + ], + "body": [ + { + "value": "If you're working on a simple PHP application, [a simple development shell][0] with PHP and Composer may be enough.\r\n\r\nBut what if you're building a more complex application, like a Drupal website?\r\n\r\nAs well as PHP, it needs services like a database server.\r\n\r\nInstalling `mysql` or `mariadb` isn't enough - it needs to be running so your application can connect to it.\r\n\r\nIf you use NixOS - the operating system based on the Nix package manager - configuring a database server is as simple as `services.mysql.enable = true;`.\r\n\r\nIt will start automatically when the computer starts and you can add more Nix code to create databases and manage permissions.\r\n\r\nBut what if you're not using NixOS?\r\n\r\nThe Nix package manager can't manage services.\r\n\r\nBut, there is a solution - [services-flake][1].\r\n\r\nIt can be added to a flake.nix file and adds a tool called Process Compose to manage processes and services.\r\n\r\nThen, I can add code like this to start a database server and create the database with `nix run`:\r\n\r\n```nix\r\nservices.mysql.\"mysql1\" = {\r\n enable = true;\r\n\r\n initialDatabases = [\r\n { name = \"drupal_nix_flake_example\"; }\r\n ];\r\n};\r\n```\r\n\r\nIf you have other processes, such as running Tailwind CSS to build your CSS files, it can do that too.\r\n\r\nTo see a full Drupal example using services-flake, see [my drupal-nix-flake-example][2] repository.\r\n\r\n[0]: \/daily\/2025\/06\/27\/ready-go-devshells\r\n[1]: https:\/\/github.com\/juspay\/services-flake\r\n[2]: https:\/\/code.oliverdavies.uk\/opdavies\/drupal-nix-flake-example", + "format": "markdown", + "processed": "

If you're working on a simple PHP application, a simple development shell<\/a> with PHP and Composer may be enough.<\/p>\n

But what if you're building a more complex application, like a Drupal website?<\/p>\n

As well as PHP, it needs services like a database server.<\/p>\n

Installing mysql<\/code> or mariadb<\/code> isn't enough - it needs to be running so your application can connect to it.<\/p>\n

If you use NixOS - the operating system based on the Nix package manager - configuring a database server is as simple as services.mysql.enable = true;<\/code>.<\/p>\n

It will start automatically when the computer starts and you can add more Nix code to create databases and manage permissions.<\/p>\n

But what if you're not using NixOS?<\/p>\n

The Nix package manager can't manage services.<\/p>\n

But, there is a solution - services-flake<\/a>.<\/p>\n

It can be added to a flake.nix file and adds a tool called Process Compose to manage processes and services.<\/p>\n

Then, I can add code like this to start a database server and create the database with nix run<\/code>:<\/p>\n

services.mysql.\"mysql1\" = {\n  enable = true;\n\n  initialDatabases = [\n    { name = \"drupal_nix_flake_example\"; }\n  ];\n};\n<\/code><\/pre>

If you have other processes, such as running Tailwind CSS to build your CSS files, it can do that too.<\/p>\n

To see a full Drupal example using services-flake, see my drupal-nix-flake-example<\/a> repository.<\/p>\n", + "summary": "" + } + ], + "field_daily_email_cta": [ + { + "target_type": "node", + "target_uuid": "c74de3cf-5362-4d08-935a-a9d0d22fcb94" + } + ] +} \ No newline at end of file diff --git a/content/path_alias.3f83b9fb-dd35-4335-9496-2a8a99d281ec.json b/content/path_alias.3f83b9fb-dd35-4335-9496-2a8a99d281ec.json new file mode 100644 index 000000000..61637afef --- /dev/null +++ b/content/path_alias.3f83b9fb-dd35-4335-9496-2a8a99d281ec.json @@ -0,0 +1,27 @@ +{ + "uuid": [ + { + "value": "3f83b9fb-dd35-4335-9496-2a8a99d281ec" + } + ], + "langcode": [ + { + "value": "en" + } + ], + "path": [ + { + "value": "\/node\/c7e013f4-a712-4566-9e6e-6a4b1f580e30" + } + ], + "alias": [ + { + "value": "\/daily\/2025\/06\/30\/managing-services-without-nixos" + } + ], + "status": [ + { + "value": true + } + ] +} \ No newline at end of file