100 lines
No EOL
6.4 KiB
JSON
100 lines
No EOL
6.4 KiB
JSON
{
|
|
"uuid": [
|
|
{
|
|
"value": "52049b70-5092-41ea-a749-5fde0d95b39e"
|
|
}
|
|
],
|
|
"langcode": [
|
|
{
|
|
"value": "en"
|
|
}
|
|
],
|
|
"type": [
|
|
{
|
|
"target_id": "daily_email",
|
|
"target_type": "node_type",
|
|
"target_uuid": "8bde1f2f-eef9-4f2d-ae9c-96921f8193d7"
|
|
}
|
|
],
|
|
"revision_timestamp": [
|
|
{
|
|
"value": "2025-05-11T09:00:04+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": "Running Drupal on devenv"
|
|
}
|
|
],
|
|
"created": [
|
|
{
|
|
"value": "2024-12-09T00:00:00+00:00"
|
|
}
|
|
],
|
|
"changed": [
|
|
{
|
|
"value": "2025-05-11T09:00:04+00:00"
|
|
}
|
|
],
|
|
"promote": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"sticky": [
|
|
{
|
|
"value": false
|
|
}
|
|
],
|
|
"default_langcode": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"revision_translation_affected": [
|
|
{
|
|
"value": true
|
|
}
|
|
],
|
|
"path": [
|
|
{
|
|
"alias": "\/daily\/2024\/12\/09\/drupal-devenv",
|
|
"langcode": "en"
|
|
}
|
|
],
|
|
"body": [
|
|
{
|
|
"value": "\n <p>I recently said that <a href=\"\/daily\/2024\/11\/30\/using-nix-for-local-application-development\">I've been using devenv to run Drupal applications locally<\/a>.<\/p>\n\n<p>Here's the <code>devenv.nix<\/code> file I used for <a href=\"\/presentations\/tdd-test-driven-drupal\">my recent talk for the Drupal London meetup<\/a>:<\/p>\n\n<pre><code class=\"nix\">{ pkgs, ... }:\n\nlet\n drupal.root = \"web\";\nin\n{\n packages = [ pkgs.git ];\n\n dotenv.disableHint = true;\n\n languages = {\n php = {\n enable = true;\n version = \"8.2\";\n\n ini = ''\n memory_limit = 256M\n '';\n\n fpm.pools.web = {\n listen = \"127.0.0.1:9000\";\n\n settings = {\n \"pm\" = \"dynamic\";\n \"pm.max_children\" = 75;\n \"pm.max_requests\" = 500;\n \"pm.max_spare_servers\" = 20;\n \"pm.min_spare_servers\" = 5;\n \"pm.start_servers\" = 10;\n };\n };\n };\n };\n\n processes = { };\n\n services = {\n caddy = {\n enable = true;\n\n config = ''\n {\n http_port 8080\n }\n\n localhost:8080 {\n root * ${drupal.root}\n encode gzip\n php_fastcgi localhost:9000\n file_server\n }\n '';\n };\n\n mysql = {\n enable = true;\n initialDatabases = [ { name = \"drupal_london\"; } ];\n };\n };\n\n enterShell = ''\n if [[ ! -d vendor ]]; then\n composer install\n fi\n '';\n\n enterTest = ''\n phpunit --testdox\n '';\n}\n<\/code><\/pre>\n\n<p>It installs the required version of PHP for this project, creates a web server (Caddy) and configures MariaDB with a default database.<\/p>\n\n<p>I've also added commands to run <code>composer install<\/code> to download dependencies when entering the shell and <code>phpunit<\/code> for tests.<\/p>\n\n<p>With this approach, there's no need for containers as everything is run locally and I can view the site at <a href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a> (or whatever port is defined).<\/p>\n\n<p>All of my current development projects are using this approach and I think it'll be my default method for future projects.<\/p>\n\n ",
|
|
"format": "full_html",
|
|
"processed": "\n <p>I recently said that <a href=\"http:\/\/default\/daily\/2024\/11\/30\/using-nix-for-local-application-development\">I've been using devenv to run Drupal applications locally<\/a>.<\/p>\n\n<p>Here's the <code>devenv.nix<\/code> file I used for <a href=\"http:\/\/default\/presentations\/tdd-test-driven-drupal\">my recent talk for the Drupal London meetup<\/a>:<\/p>\n\n<pre><code class=\"nix\">{ pkgs, ... }:\n\nlet\n drupal.root = \"web\";\nin\n{\n packages = [ pkgs.git ];\n\n dotenv.disableHint = true;\n\n languages = {\n php = {\n enable = true;\n version = \"8.2\";\n\n ini = ''\n memory_limit = 256M\n '';\n\n fpm.pools.web = {\n listen = \"127.0.0.1:9000\";\n\n settings = {\n \"pm\" = \"dynamic\";\n \"pm.max_children\" = 75;\n \"pm.max_requests\" = 500;\n \"pm.max_spare_servers\" = 20;\n \"pm.min_spare_servers\" = 5;\n \"pm.start_servers\" = 10;\n };\n };\n };\n };\n\n processes = { };\n\n services = {\n caddy = {\n enable = true;\n\n config = ''\n {\n http_port 8080\n }\n\n localhost:8080 {\n root * ${drupal.root}\n encode gzip\n php_fastcgi localhost:9000\n file_server\n }\n '';\n };\n\n mysql = {\n enable = true;\n initialDatabases = [ { name = \"drupal_london\"; } ];\n };\n };\n\n enterShell = ''\n if [[ ! -d vendor ]]; then\n composer install\n fi\n '';\n\n enterTest = ''\n phpunit --testdox\n '';\n}\n<\/code><\/pre>\n\n<p>It installs the required version of PHP for this project, creates a web server (Caddy) and configures MariaDB with a default database.<\/p>\n\n<p>I've also added commands to run <code>composer install<\/code> to download dependencies when entering the shell and <code>phpunit<\/code> for tests.<\/p>\n\n<p>With this approach, there's no need for containers as everything is run locally and I can view the site at <a href=\"http:\/\/localhost:8080\">http:\/\/localhost:8080<\/a> (or whatever port is defined).<\/p>\n\n<p>All of my current development projects are using this approach and I think it'll be my default method for future projects.<\/p>\n\n ",
|
|
"summary": null
|
|
}
|
|
],
|
|
"feeds_item": [
|
|
{
|
|
"imported": "1970-01-01T00:32:50+00:00",
|
|
"guid": null,
|
|
"hash": "47f25a425d659c954d97d5112ac43a64",
|
|
"target_type": "feeds_feed",
|
|
"target_uuid": "90c85284-7ca8-4074-9178-97ff8384fe76"
|
|
}
|
|
]
|
|
} |