Add daily email

This commit is contained in:
Oliver Davies 2025-07-02 20:15:14 +01:00
parent 902133d94f
commit 5d5aacc9aa
3 changed files with 131 additions and 0 deletions

View file

@ -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"
]
}

View file

@ -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": "<p>If you're working on a simple PHP application, <a href=\"http:\/\/localhost:8888\/daily\/2025\/06\/27\/ready-go-devshells\">a simple development shell<\/a> with PHP and Composer may be enough.<\/p>\n<p>But what if you're building a more complex application, like a Drupal website?<\/p>\n<p>As well as PHP, it needs services like a database server.<\/p>\n<p>Installing <code>mysql<\/code> or <code>mariadb<\/code> isn't enough - it needs to be running so your application can connect to it.<\/p>\n<p>If you use NixOS - the operating system based on the Nix package manager - configuring a database server is as simple as <code>services.mysql.enable = true;<\/code>.<\/p>\n<p>It will start automatically when the computer starts and you can add more Nix code to create databases and manage permissions.<\/p>\n<p>But what if you're not using NixOS?<\/p>\n<p>The Nix package manager can't manage services.<\/p>\n<p>But, there is a solution - <a href=\"https:\/\/github.com\/juspay\/services-flake\">services-flake<\/a>.<\/p>\n<p>It can be added to a flake.nix file and adds a tool called Process Compose to manage processes and services.<\/p>\n<p>Then, I can add code like this to start a database server and create the database with <code>nix run<\/code>:<\/p>\n<pre><code>services.mysql.\"mysql1\" = {\n enable = true;\n\n initialDatabases = [\n { name = \"drupal_nix_flake_example\"; }\n ];\n};\n<\/code><\/pre><p>If you have other processes, such as running Tailwind CSS to build your CSS files, it can do that too.<\/p>\n<p>To see a full Drupal example using services-flake, see <a href=\"https:\/\/code.oliverdavies.uk\/opdavies\/drupal-nix-flake-example\">my drupal-nix-flake-example<\/a> repository.<\/p>\n",
"summary": ""
}
],
"field_daily_email_cta": [
{
"target_type": "node",
"target_uuid": "c74de3cf-5362-4d08-935a-a9d0d22fcb94"
}
]
}

View file

@ -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
}
]
}