{"id":59,"date":"2021-04-01T19:36:17","date_gmt":"2021-04-01T10:36:17","guid":{"rendered":"https:\/\/blog.kanetech.pro\/wordpress\/?p=59"},"modified":"2021-04-03T07:42:54","modified_gmt":"2021-04-02T22:42:54","slug":"post-59","status":"publish","type":"post","link":"https:\/\/blog.kanetech.pro\/wordpress\/59\/post-59\/","title":{"rendered":"Directus \u3092 Docker \u3067\u7acb\u3061\u4e0a\u3052\u308b"},"content":{"rendered":"\n<p>Directus\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u9023\u643a\u6027\u304c\u9ad8\u3044\u30d8\u30c3\u30c9\u30ec\u30b9CMS\u3067\u3059\u3002<\/p>\n\n\n\n<p>\u672c\u6765CMS\u306e\u4e00\u7a2e\u306a\u306e\u3067\u30d6\u30ed\u30b0\u7cfb\u306e\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u306e\u306b\u5411\u3044\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u60c5\u5831\u3092REST API\u3068\u3057\u3066\u516c\u958b\u3059\u308b\u305f\u3081\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3057\u3066\u3082\u4f7f\u3048\u305d\u3046\u3067\u3059\u3002\u3068\u3044\u3046\u304b\u3053\u3063\u3061\u306e\u7528\u9014\u3067\u671f\u5f85\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<h2>docker-compose.yaml<\/h2>\n\n\n\n<p>\u307b\u307c\u516c\u5f0f\u30b5\u30a4\u30c8\u306e\u30b5\u30f3\u30d7\u30eb\u305d\u306e\u307e\u307e\u3067\u3059\u304c\u3001\u30a2\u30c3\u30d7\u30ed\u30fc\u30c9\u3057\u305f\u753b\u50cf\u304cdocker\u5185\u306b\u4fdd\u5b58\u3055\u308c\u3066\u3057\u307e\u3046\u554f\u984c\u304c\u3042\u3063\u305f\u306e\u3067\u3001\u30db\u30b9\u30c8\u5074\u306b\u4fdd\u5b58\u3055\u308c\u308b\u3088\u3046\u4fee\u6b63\u3057\u3066\u3044\u307e\u3059\u3002 <\/p>\n\n\n\n<p>KEY\u3068SECRET\u306fuuidgen\u30b3\u30de\u30f3\u30c9\u3067\u751f\u6210\u3057\u305f\u3082\u306e\u306b\u66f8\u304d\u63db\u3048\u3066\u304a\u304f\u3068\u826f\u3044\u3067\u3057\u3087\u3046\u3002<br>ADMIN_EMAIL\u3068ADMIN_PASSWORD\u306f\u304a\u597d\u304d\u306a\u3082\u306e\u306b\u5909\u66f4\u3057\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\uff1a<a href=\"https:\/\/docs.directus.io\/guides\/installation\/docker\/\">Installing with Docker | Directus Docs<\/a><\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-javascript\"><code class=\"language-javascript\">version: '3.2'\nservices:\n  database:\n    container_name: database\n    image: postgres:12\n    volumes:\n      - .\/data\/database:\/var\/lib\/postgresql\/data\n    networks:\n      - directus\n    environment:\n      POSTGRES_USER: 'directus'\n      POSTGRES_PASSWORD: 'directus'\n      POSTGRES_DB: 'directus'\n\n  cache:\n    container_name: cache\n    image: redis:6\n    networks:\n      - directus\n\n  directus:\n    container_name: directus\n    image: directus\/directus:v9.0.0-rc.51\n    volumes:\n      - .\/data\/uploads:\/directus\/uploads\n    ports:\n      - 8055:8055\n    networks:\n      - directus\n    depends_on:\n      - cache\n      - database\n    environment:\n      KEY: '255d861b-5ea1-5996-9aa3-922530ec40b1'\n      SECRET: '6116487b-cda1-52c2-b5b5-c8022c45e263'\n\n      DB_CLIENT: 'pg'\n      DB_HOST: 'database'\n      DB_PORT: '5432'\n      DB_DATABASE: 'directus'\n      DB_USER: 'directus'\n      DB_PASSWORD: 'directus'\n\n      CACHE_ENABLED: 'true'\n      CACHE_STORE: 'redis'\n      CACHE_REDIS: 'redis:\/\/cache:6379'\n\n      ADMIN_EMAIL: 'admin@example.com'\n      ADMIN_PASSWORD: 'd1r3ctu5'\n\nnetworks:\n  directus:<\/code><\/pre>\n\n\n\n<h2>\u8d77\u52d5<\/h2>\n\n\n\n<p>\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u8d77\u52d5\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-luxe-blocks-syntaxhighlighter line-numbers language-bash\"><code class=\"language-bash\">$ docker-compose up -d<\/code><\/pre>\n\n\n\n<h2>\u8868\u793a<\/h2>\n\n\n\n<p>\u30d6\u30e9\u30a6\u30b6\u304b\u3089 <a href=\"http:\/\/localhost:8055\/\">http:\/\/localhost:8055\/<\/a> \u306b\u30a2\u30af\u30bb\u30b9\u3059\u308b\u3068\u3001\u521d\u671f\u753b\u9762\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"1024\" height=\"684\" src=\"https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-1024x684.png\" alt=\"Directus\u521d\u671f\u30ed\u30b0\u30a4\u30f3\u753b\u9762\" class=\"wp-image-60\" srcset=\"https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-1024x684.png 1024w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-300x200.png 300w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-768x513.png 768w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-1536x1026.png 1536w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-2048x1368.png 2048w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-530x354.png 530w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-565x377.png 565w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-710x474.png 710w, https:\/\/blog.kanetech.pro\/wordpress\/wp-content\/uploads\/2021\/04\/\u30b9\u30af\u30ea\u30fc\u30f3\u30b7\u30e7\u30c3\u30c8-2021-04-01-19.30.39-725x484.png 725w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>ADMIN\uff3fEMAIL\u3001ADMIN _PASSWORD\u306b\u8a2d\u5b9a\u3057\u305f\u5024\u3092\u5165\u529b\u3059\u308b\u3068\u30ed\u30b0\u30a4\u30f3\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<h2>\u304a\u308f\u308a\u306b<\/h2>\n\n\n\n<p>\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u306e\u30b5\u30fc\u30d0\u5074\u3063\u3066\u672c\u8cea\u7684\u306b\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306a\u306e\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u30a2\u30af\u30bb\u30b9\u5236\u5fa1\u306f\u30c6\u30fc\u30d6\u30eb\u5358\u4f4d\u306a\u306e\u3067\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3092\u30a2\u30d7\u30ea\u306b\u4e38\u3054\u3068\u516c\u958b\u3059\u308b\u308f\u3051\u306b\u306f\u3044\u304d\u307e\u305b\u3093\u3002<\/p>\n\n\n\n<p>\u305d\u3053\u3067\u901a\u5e38\u306fPHP\u306a\u3069\u3067\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u30b9\u30de\u30db\u30a2\u30d7\u30ea\u306e\u6a4b\u6e21\u3057\u3068\u306a\u308b\u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u3092\u66f8\u304f\u3093\u3058\u3083\u306a\u3044\u304b\u3068\u601d\u3044\u307e\u3059\u3002\u6a4b\u6e21\u3057\u306b\u671f\u5f85\u3057\u305f\u3044\u5f79\u5272\u306f\u300c\u30af\u30a8\u30ea\u3068JSON\u306e\u76f8\u4e92\u5909\u63db\u300d\u300c\u9069\u5207\u306a\u30d5\u30a3\u30eb\u30bf\u30ea\u30f3\u30b0\u300d\u3068\u3044\u3063\u305f\u3068\u3053\u308d\u3067\u3059\u304c\u3001\u305d\u308c\u306b\u3057\u3066\u306f\u66f8\u304f\u30b3\u30fc\u30c9\u304c\u904e\u5270\u306a\u3093\u3067\u3059\u3002\u5927\u4f53\u30d9\u30bf\u66f8\u304d\u306f\u3057\u306a\u3044\u306e\u3067\u3001\u30e2\u30c7\u30eb\u3084\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3092\u66f8\u304f\u3067\u3057\u3087\u3046\u3057\u3001\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3082\u4f55\u304b\u63a1\u7528\u3059\u308b\u3067\u3057\u3087\u3046\u304b\u3089\u3001\u305d\u306e\u5468\u8fba\u306e\u77e5\u8b58\u3082\u6c42\u3081\u3089\u308c\u307e\u3059\u3002\u4f8b\u3048\u3070Laravel\u3067\u3042\u308c\u3070\u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3\u3092\u7406\u89e3\u3057\u3066\u30e2\u30c7\u30eb\u3084\u30b3\u30f3\u30c8\u30ed\u30fc\u30e9\u3001\u30eb\u30fc\u30c6\u30a3\u30f3\u30b0\u3082\u7406\u89e3\u3057\u3066\u3001artisan\u30b3\u30de\u30f3\u30c9\u3082\u899a\u3048\u3066\u30fb\u30fb\u30fb\u3002\u307e\u3041View\u304c\u306a\u3044\u5206\u697d\u3067\u306f\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u5f79\u5272\u304b\u3089\u3059\u308b\u3068\u904e\u5270\u3067\u3059\u3002<\/p>\n\n\n\n<p>Directus\u3092\u4f7f\u3048\u3070\u30ed\u30fc\u30eb\u306b\u30d5\u30a3\u30eb\u30bf\u30eb\u30fc\u30eb\u3092\u66f8\u304f\u3060\u3051\u3067\u4e0a\u8a18\u304c\u5b9f\u73fe\u3067\u304d\u3066\u3057\u307e\u3044\u307e\u3059\u3002\u7d76\u5bfe\u65e9\u3044\u3088\u306d\u3002\u3053\u308c\u304b\u3089\u3082Directus\u306e\u4f7f\u3044\u65b9\u306b\u3064\u3044\u3066\u767a\u4fe1\u3057\u3066\u3044\u304d\u307e\u3059\u306e\u3067\u3088\u308d\u3057\u304f\u304a\u9858\u3044\u3044\u305f\u3057\u307e\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Directus\u306f\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u3068\u306e\u9023\u643a\u6027\u304c\u9ad8\u3044\u30d8\u30c3\u30c9\u30ec\u30b9CMS\u3067\u3059\u3002 \u672c\u6765CMS\u306e\u4e00\u7a2e\u306a\u306e\u3067\u30d6\u30ed\u30b0\u7cfb\u306e\u30b5\u30a4\u30c8\u3092\u69cb\u7bc9\u3059\u308b\u306e\u306b\u5411\u3044\u3066\u3044\u308b\u306e\u3067\u3059\u304c\u3001\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e\u60c5\u5831\u3092REST API\u3068\u3057\u3066\u516c\u958b\u3059\u308b\u305f\u3081\u306e\u30d5\u30ec\u30fc\u30e0\u30ef\u30fc\u30af\u3068\u3057\u3066\u3082 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":70,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[],"_links":{"self":[{"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/posts\/59"}],"collection":[{"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/comments?post=59"}],"version-history":[{"count":4,"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/posts\/59\/revisions"}],"predecessor-version":[{"id":71,"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/posts\/59\/revisions\/71"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/media\/70"}],"wp:attachment":[{"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/media?parent=59"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/categories?post=59"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.kanetech.pro\/wordpress\/wp-json\/wp\/v2\/tags?post=59"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}