{"id":3471,"date":"2025-11-13T10:23:16","date_gmt":"2025-11-13T03:23:16","guid":{"rendered":"https:\/\/portal-atlasx.cdg.co.th\/home\/?post_type=docs&#038;p=3471"},"modified":"2025-11-13T10:23:16","modified_gmt":"2025-11-13T03:23:16","slug":"traefik","status":"publish","type":"docs","link":"https:\/\/portal-atlasx.cdg.co.th\/home\/docs\/atlasx-container\/reverse-proxy\/traefik\/","title":{"rendered":"Traefik"},"content":{"rendered":"\n<h1 class=\"wp-block-heading\" id=\"traefik-proxy\">Traefik Proxy<\/h1>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/doc.traefik.io\/traefik\/assets\/img\/traefik-architecture.png\" alt=\"Trafik Diagram\" title=\"null\"\/><\/figure>\n\n\n\n<p>Trafik \u0e40\u0e1b\u0e47\u0e19&nbsp;<a href=\"https:\/\/github.com\/traefik\/traefik\" target=\"_blank\" rel=\"noreferrer noopener\">Open-source<\/a>&nbsp;Proxy Load Balancer \u0e17\u0e35\u0e48\u0e0a\u0e48\u0e27\u0e22\u0e43\u0e2b\u0e49\u0e01\u0e32\u0e23\u0e17\u0e33 reverse proxy \u0e2b\u0e23\u0e37\u0e2d\u0e01\u0e32\u0e23\u0e17\u0e33 load balance \u0e19\u0e31\u0e49\u0e19\u0e2a\u0e30\u0e14\u0e27\u0e01\u0e41\u0e25\u0e30\u0e07\u0e48\u0e32\u0e22\u0e14\u0e32\u0e22\u0e22\u0e34\u0e48\u0e07\u0e02\u0e36\u0e49\u0e19 \u0e0a\u0e48\u0e27\u0e22\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23 request \u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e20\u0e32\u0e22\u0e43\u0e19\u0e23\u0e30\u0e1a\u0e1a\u0e43\u0e2b\u0e49\u0e01\u0e25\u0e32\u0e22\u0e40\u0e1b\u0e47\u0e19\u0e40\u0e23\u0e37\u0e48\u0e2d\u0e07\u0e17\u0e35\u0e48\u0e07\u0e48\u0e32\u0e22\u0e01\u0e27\u0e48\u0e32\u0e40\u0e14\u0e34\u0e21<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"install-traefik\">Install Traefik<\/h2>\n\n\n\n<p>\u0e43\u0e19\u0e01\u0e32\u0e23\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07 Traefik \u0e19\u0e31\u0e49\u0e19\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49 Docker Compose \u0e0a\u0e48\u0e27\u0e22\u0e15\u0e34\u0e14\u0e15\u0e31\u0e49\u0e07\u0e44\u0e14\u0e49\u0e07\u0e48\u0e32\u0e22 \u0e46 \u0e42\u0e14\u0e22\u0e17\u0e33\u0e01\u0e32\u0e23\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>docker-compose.yml<\/code>&nbsp;\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>version: '3.3'\n\nservices:\n  traefik:\n    image: 'traefik:latest'\n    container_name: 'traefik'\n    restart: always\n    networks:\n      - frontend\n    ports:\n      - '80:80'\n      - '443:443'\n      - '8080:8080' # Don't do this in production!\n    volumes:\n      - \/etc\/traefik:\/etc\/traefik\n      - \/var\/run\/docker.sock:\/var\/run\/docker.sock:ro\n\nnetworks:\n  frontend:\n    external: true<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">version: <\/span><span style=\"color: #A31515\">&#39;3.3&#39;<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">services:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  traefik:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    image: <\/span><span style=\"color: #A31515\">&#39;traefik:latest&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    container_name: <\/span><span style=\"color: #A31515\">&#39;traefik&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    restart: <\/span><span style=\"color: #001080\">always<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    networks:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      - <\/span><span style=\"color: #001080\">frontend<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    ports:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      - <\/span><span style=\"color: #A31515\">&#39;80:80&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      - <\/span><span style=\"color: #A31515\">&#39;443:443&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      - <\/span><span style=\"color: #A31515\">&#39;8080:8080&#39;<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #001080\">Don<\/span><span style=\"color: #A31515\">&#39;t do this in production<\/span><span style=\"color: #CD3131\">!<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    volumes:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      - \/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/traefik:\/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      - \/<\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">run<\/span><span style=\"color: #000000\">\/docker.sock:\/<\/span><span style=\"color: #267F99\">var<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #267F99\">run<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #267F99\">docker<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #267F99\">sock<\/span><span style=\"color: #000000\">:<\/span><span style=\"color: #267F99\">ro<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">networks:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  frontend:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    external: <\/span><span style=\"color: #0000FF\">true<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e42\u0e14\u0e22 Traefik \u0e08\u0e30\u0e21\u0e35\u0e02\u0e32\u0e40\u0e02\u0e49\u0e32 2 \u0e0a\u0e48\u0e2d\u0e07\u0e17\u0e32\u0e07\u0e04\u0e37\u0e2d :80 \u0e41\u0e25\u0e30 :443 \u0e2a\u0e48\u0e27\u0e19 :8080 \u0e08\u0e30\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 dashboard \u0e0b\u0e36\u0e48\u0e07\u0e41\u0e19\u0e30\u0e19\u0e33\u0e43\u0e2b\u0e49\u0e1b\u0e34\u0e14\u0e44\u0e27\u0e49\u0e2b\u0e32\u0e01\u0e44\u0e21\u0e48\u0e21\u0e35\u0e04\u0e27\u0e32\u0e21\u0e08\u0e33\u0e40\u0e1b\u0e47\u0e19 \u0e40\u0e19\u0e37\u0e48\u0e2d\u0e07\u0e08\u0e32\u0e01\u0e40\u0e1b\u0e47\u0e19\u0e01\u0e32\u0e23\u0e40\u0e1b\u0e34\u0e14\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 API \u0e02\u0e2d\u0e07 Traefik \u0e0b\u0e36\u0e48\u0e07\u0e2d\u0e32\u0e08\u0e17\u0e33\u0e43\u0e2b\u0e49\u0e40\u0e01\u0e34\u0e14\u0e1b\u0e31\u0e0d\u0e2b\u0e32\u0e04\u0e27\u0e32\u0e21\u0e1b\u0e25\u0e2d\u0e14\u0e20\u0e31\u0e22\u0e44\u0e14\u0e49<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h5 class=\"wp-block-heading\">Note<\/h5>\n\n\n\n<p><\/p>\n\n\n\n<p>\u26a0\ufe0f \u0e2d\u0e22\u0e48\u0e32\u0e25\u0e37\u0e21\u0e2a\u0e23\u0e49\u0e32\u0e07 network \u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e08\u0e31\u0e14\u0e01\u0e32\u0e23 traffic \u0e17\u0e35\u0e48\u0e08\u0e30\u0e43\u0e2b\u0e49\u0e40\u0e02\u0e49\u0e32\u0e21\u0e32\u0e43\u0e19\u0e41\u0e2d\u0e1e\u0e17\u0e35\u0e48\u0e40\u0e1b\u0e47\u0e19 container \u0e40\u0e0a\u0e48\u0e19\u0e43\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e43\u0e0a\u0e49 network \u0e0a\u0e37\u0e48\u0e2d&nbsp;<code>frontend<\/code>&nbsp;\u0e0b\u0e36\u0e48\u0e07\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e14\u0e49\u0e14\u0e49\u0e27\u0e22\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07&nbsp;<code>docker network create frontend<\/code><\/p>\n<\/blockquote>\n\n\n\n<p>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e2a\u0e23\u0e49\u0e32\u0e07\u0e44\u0e1f\u0e25\u0e4c\u0e17\u0e35\u0e48&nbsp;<code>\/etc\/traefik\/traefik.yml<\/code>&nbsp;\u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>global:\n  checkNewVersion: true\n  sendAnonymousUsage: false # true by default\n\nlog:\n  level: ERROR # DEBUG, INFO, WARNING, ERROR, CRITICAL\n  format: common # common, json, logfmt\n  filePath: \/var\/log\/traefik\/traefik.log\n\naccesslog:\nformat: common # common, json, logfmt\nfilePath: \/var\/log\/traefik\/access.log\n\napi:\n  dashboard: true\n  insecure: true # Don't do this in production!\n\nentryPoints:\n  web:\n    address: :80\n  websecure:\n    address: :443\n\nproviders:\n  docker:\n    exposedByDefault: false # Default is true\n    network: frontend # Docker network\n  file:\n    directory: \/etc\/traefik\n    watch: true<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">global:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  checkNewVersion: <\/span><span style=\"color: #0000FF\">true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  sendAnonymousUsage: <\/span><span style=\"color: #0000FF\">false<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #0000FF\">true<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">by<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #AF00DB\">default<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">log:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  level: <\/span><span style=\"color: #0070C1\">ERROR<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #0070C1\">DEBUG<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0070C1\">INFO<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0070C1\">WARNING<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0070C1\">ERROR<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #0070C1\">CRITICAL<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  format: <\/span><span style=\"color: #001080\">common<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #001080\">common<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #001080\">json<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #001080\">logfmt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  filePath: \/<\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">log<\/span><span style=\"color: #000000\">\/traefik\/traefik.log<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">accesslog:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">format: <\/span><span style=\"color: #001080\">common<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #001080\">common<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #001080\">json<\/span><span style=\"color: #000000\">, <\/span><span style=\"color: #001080\">logfmt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">filePath: \/<\/span><span style=\"color: #0000FF\">var<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">log<\/span><span style=\"color: #000000\">\/traefik\/access.log<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">api:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  dashboard: <\/span><span style=\"color: #0000FF\">true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  insecure: <\/span><span style=\"color: #0000FF\">true<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #001080\">Don<\/span><span style=\"color: #A31515\">&#39;t do this in production<\/span><span style=\"color: #CD3131\">!<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">entryPoints:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  web:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    address: :<\/span><span style=\"color: #098658\">80<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  websecure:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    address: :<\/span><span style=\"color: #098658\">443<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #000000\">providers:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  docker:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    exposedByDefault: <\/span><span style=\"color: #0000FF\">false<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #001080\">Default<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">is<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #0000FF\">true<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    network: <\/span><span style=\"color: #001080\">frontend<\/span><span style=\"color: #000000\"> # <\/span><span style=\"color: #001080\">Docker<\/span><span style=\"color: #000000\"> <\/span><span style=\"color: #001080\">network<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  file:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    directory: \/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    watch: <\/span><span style=\"color: #0000FF\">true<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e2b\u0e25\u0e31\u0e07\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e43\u0e2b\u0e49\u0e23\u0e31\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07&nbsp;<code>docker-compose up -d<\/code>&nbsp;\u0e41\u0e25\u0e49\u0e27\u0e40\u0e02\u0e49\u0e32\u0e44\u0e1b\u0e17\u0e35\u0e48&nbsp;<a href=\"http:\/\/localhost:8080\/\" target=\"_blank\" rel=\"noreferrer noopener\">http:\/\/localhost:8080<\/a>&nbsp;\u0e08\u0e30\u0e40\u0e2b\u0e47\u0e19 dashboard \u0e02\u0e2d\u0e07 Traefik \u0e41\u0e25\u0e49\u0e27<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"application-configuration\">Application Configuration<\/h2>\n\n\n\n<p>\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e43\u0e2b\u0e49 container \u0e02\u0e2d\u0e07\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49\u0e07\u0e32\u0e19 Traefik \u0e44\u0e14\u0e49 \u0e19\u0e31\u0e49\u0e19\u0e40\u0e23\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e43\u0e0a\u0e49 label \u0e02\u0e2d\u0e07 Docker \u0e43\u0e19\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e04\u0e48\u0e32\u0e44\u0e14\u0e49 \u0e42\u0e14\u0e22\u0e43\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49\u0e40\u0e23\u0e32\u0e08\u0e30\u0e43\u0e0a\u0e49 label \u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<h5 class=\"wp-block-heading\">Note<\/h5>\n\n\n\n<p><\/p>\n\n\n\n<p>\u0e43\u0e19\u0e15\u0e31\u0e27\u0e2d\u0e22\u0e48\u0e32\u0e07\u0e19\u0e35\u0e49\u0e40\u0e23\u0e32\u0e43\u0e0a\u0e49 label \u0e02\u0e2d\u0e07 Docker Compose \u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e41\u0e1b\u0e25\u0e07\u0e40\u0e1b\u0e47\u0e19 label \u0e02\u0e2d\u0e07 Docker \u0e43\u0e2b\u0e49\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34 \u0e0b\u0e36\u0e48\u0e07\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e14\u0e39\u0e44\u0e14\u0e49\u0e08\u0e32\u0e01&nbsp;<a href=\"https:\/\/docs.docker.com\/compose\/compose-file\/compose-file-v3\/#labels\" target=\"_blank\" rel=\"noreferrer noopener\">Docker Compose File Reference<\/a><\/p>\n<\/blockquote>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>labels:\n  - 'traefik.enable=true'\n  - 'traefik.http.routers.${APP_NAME}.entrypoints=web'\n  - 'traefik.http.routers.${APP_NAME}.rule=Host(`${HOST_URL}`) &amp;&amp; PathPrefix(`\/${APP_NAME}`)'\n  - 'traefik.http.routers.${APP_NAME}.middlewares=${APP_NAME}-stripprefix'\n  - 'traefik.http.middlewares.${APP_NAME}-stripprefix.stripprefix.prefixes=\/${APP_NAME}'\n  - 'traefik.http.services.${APP_NAME}.loadbalancer.server.port=80'<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">labels:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - <\/span><span style=\"color: #A31515\">&#39;traefik.enable=true&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - <\/span><span style=\"color: #A31515\">&#39;traefik.http.routers.${APP_NAME}.entrypoints=web&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - <\/span><span style=\"color: #A31515\">&#39;traefik.http.routers.${APP_NAME}.rule=Host(`${HOST_URL}`) &amp;&amp; PathPrefix(`\/${APP_NAME}`)&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - <\/span><span style=\"color: #A31515\">&#39;traefik.http.routers.${APP_NAME}.middlewares=${APP_NAME}-stripprefix&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - <\/span><span style=\"color: #A31515\">&#39;traefik.http.middlewares.${APP_NAME}-stripprefix.stripprefix.prefixes=\/${APP_NAME}&#39;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - <\/span><span style=\"color: #A31515\">&#39;traefik.http.services.${APP_NAME}.loadbalancer.server.port=80&#39;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e0b\u0e36\u0e48\u0e07 Traefik \u0e08\u0e30\u0e2d\u0e48\u0e32\u0e19 label \u0e40\u0e2b\u0e25\u0e48\u0e32\u0e19\u0e35\u0e49\u0e41\u0e25\u0e49\u0e27\u0e17\u0e33\u0e01\u0e32\u0e23\u0e01\u0e33\u0e2b\u0e19\u0e14 config \u0e15\u0e48\u0e32\u0e07 \u0e46 \u0e43\u0e2b\u0e49\u0e42\u0e14\u0e22\u0e2d\u0e31\u0e15\u0e42\u0e19\u0e21\u0e31\u0e15\u0e34<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"tls-configuration\">TLS Configuration<\/h2>\n\n\n\n<p>\u0e2a\u0e33\u0e2b\u0e23\u0e31\u0e1a\u0e01\u0e32\u0e23\u0e17\u0e33\u0e43\u0e2b\u0e49 Traefik resolve TLS \u0e43\u0e2b\u0e49 \u0e2a\u0e34\u0e48\u0e07\u0e17\u0e35\u0e48\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e15\u0e23\u0e35\u0e22\u0e21\u0e04\u0e37\u0e2d SSL Certificate \u0e0b\u0e36\u0e48\u0e07\u0e08\u0e30\u0e1b\u0e23\u0e30\u0e01\u0e2d\u0e1a\u0e44\u0e1b\u0e14\u0e49\u0e27\u0e22 2 \u0e2a\u0e48\u0e27\u0e19\u0e04\u0e37\u0e2d Certificate (<code>.pem<\/code>) \u0e41\u0e25\u0e30 Private Key (<code>.key<\/code>)<\/p>\n\n\n\n<p>\u0e43\u0e2b\u0e49 copy SSL Certificate \u0e41\u0e25\u0e30 Private Key \u0e44\u0e1b\u0e44\u0e27\u0e49\u0e43\u0e19 directory&nbsp;<code>\/etc\/traefik\/certs<\/code><\/p>\n\n\n\n<p>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e43\u0e2b\u0e49\u0e41\u0e01\u0e49\u0e44\u0e02\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>\/etc\/traefik\/traefik.yml<\/code>&nbsp;\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e43\u0e2b\u0e49 redirect \u0e44\u0e1b HTTPS \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>entryPoints:\n  web:\n    address: :80\n    http:\n      redirections:\n        entryPoint:\n          to: websecure\n          scheme: https\n  websecure:\n    address: :443<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">entryPoints:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  web:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    address: :<\/span><span style=\"color: #098658\">80<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    http:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      redirections:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        entryPoint:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">          to: <\/span><span style=\"color: #001080\">websecure<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">          scheme: <\/span><span style=\"color: #001080\">https<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  websecure:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    address: :<\/span><span style=\"color: #098658\">443<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e43\u0e2b\u0e49\u0e41\u0e01\u0e49\u0e44\u0e02\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>\/etc\/traefik\/traefik.yml<\/code>&nbsp;\u0e40\u0e1e\u0e37\u0e48\u0e2d\u0e01\u0e33\u0e2b\u0e19\u0e14\u0e43\u0e2b\u0e49\u0e43\u0e0a\u0e49 SSL Certificate \u0e41\u0e25\u0e30 Private Key \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>tls:\n  stores:\n    default:\n      defaultCertificate:\n        certFile: \/etc\/traefik\/certs\/cert.pem\n        keyFile: \/etc\/traefik\/certs\/cert.key<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">tls:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  stores:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">    <\/span><span style=\"color: #AF00DB\">default<\/span><span style=\"color: #000000\">:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">      defaultCertificate:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        certFile: \/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">certs<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">cert<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">pem<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">        keyFile: \/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">certs<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">cert<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">key<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e0b\u0e36\u0e48\u0e07\u0e0a\u0e37\u0e48\u0e2d\u0e02\u0e2d\u0e07 Certificate \u0e41\u0e25\u0e30 Private Key \u0e08\u0e30\u0e15\u0e49\u0e2d\u0e07\u0e40\u0e1b\u0e47\u0e19\u0e0a\u0e37\u0e48\u0e2d\u0e40\u0e14\u0e35\u0e22\u0e27\u0e01\u0e31\u0e19 \u0e17\u0e35\u0e48\u0e2d\u0e22\u0e39\u0e48\u0e1a\u0e19\u0e40\u0e04\u0e23\u0e37\u0e48\u0e2d\u0e07 server \u0e14\u0e49\u0e27\u0e22 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e43\u0e2b\u0e49\u0e17\u0e33\u0e01\u0e32\u0e23\u0e41\u0e01\u0e49\u0e44\u0e02\u0e44\u0e1f\u0e25\u0e4c&nbsp;<code>docker-compose.yml<\/code>&nbsp;\u0e02\u0e2d\u0e07 traefik \u0e14\u0e49\u0e27\u0e22\u0e01\u0e32\u0e23 mount volume \u0e02\u0e2d\u0e07 SSL Certificate \u0e41\u0e25\u0e30 Private Key \u0e14\u0e31\u0e07\u0e19\u0e35\u0e49<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro\" data-code-block-pro-font-family=\"Code-Pro-Fira-Code\" style=\"font-size:.875rem;font-family:Code-Pro-Fira-Code,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;line-height:1.25rem;--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span role=\"button\" tabindex=\"0\" style=\"color:#000000;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>volumes:\n  - \/etc\/traefik\/traefik.yml:\/etc\/traefik\/traefik.yml\n  - \/etc\/traefik\/certs:\/etc\/traefik\/certs<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M16.5 8.25V6a2.25 2.25 0 00-2.25-2.25H6A2.25 2.25 0 003.75 6v8.25A2.25 2.25 0 006 16.5h2.25m8.25-8.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-7.5A2.25 2.25 0 018.25 18v-1.5m8.25-8.25h-6a2.25 2.25 0 00-2.25 2.25v6\"><\/path><\/svg><\/span><pre class=\"shiki light-plus\" style=\"background-color: #FFFFFF\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #000000\">volumes:<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - \/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">yml<\/span><span style=\"color: #000000\">:\/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">.<\/span><span style=\"color: #001080\">yml<\/span><\/span>\n<span class=\"line\"><span style=\"color: #000000\">  - \/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">\/certs:\/<\/span><span style=\"color: #001080\">etc<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">traefik<\/span><span style=\"color: #000000\">\/<\/span><span style=\"color: #001080\">certs<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\u0e23\u0e31\u0e19\u0e04\u0e33\u0e2a\u0e31\u0e48\u0e07&nbsp;<code>docker-compose up -d<\/code>&nbsp;\u0e2d\u0e35\u0e01\u0e04\u0e23\u0e31\u0e49\u0e07 \u0e08\u0e32\u0e01\u0e19\u0e31\u0e49\u0e19\u0e43\u0e2b\u0e49\u0e25\u0e2d\u0e07\u0e15\u0e23\u0e27\u0e08\u0e2a\u0e2d\u0e1a Application \u0e17\u0e35\u0e48\u0e40\u0e23\u0e32\u0e15\u0e31\u0e49\u0e07\u0e04\u0e48\u0e32\u0e43\u0e2b\u0e49 Traefik \u0e27\u0e48\u0e32\u0e2a\u0e32\u0e21\u0e32\u0e23\u0e16\u0e40\u0e02\u0e49\u0e32\u0e44\u0e14\u0e49\u0e1c\u0e48\u0e32\u0e19 HTTPS \u0e44\u0e14\u0e49\u0e41\u0e25\u0e49\u0e27\u0e2b\u0e23\u0e37\u0e2d\u0e44\u0e21\u0e48<\/p>\n","protected":false},"featured_media":0,"parent":3469,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nav_title":"","positive":"","negative":"","footnotes":""},"docs_category":[],"class_list":["post-3471","docs","type-docs","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3471","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/types\/docs"}],"replies":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/comments?post=3471"}],"version-history":[{"count":1,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3471\/revisions"}],"predecessor-version":[{"id":3472,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3471\/revisions\/3472"}],"up":[{"embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs\/3469"}],"wp:attachment":[{"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/media?parent=3471"}],"wp:term":[{"taxonomy":"docs_category","embeddable":true,"href":"https:\/\/portal-atlasx.cdg.co.th\/home\/wp-json\/wp\/v2\/docs_category?post=3471"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}