|
| 1 | +<!DOCTYPE html> |
| 2 | +<html> |
| 3 | + <head> |
| 4 | + |
| 5 | + |
| 6 | + <meta charset="utf-8"> |
| 7 | + <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 8 | + <meta name="viewport" content="width=device-width, initial-scale=1"> |
| 9 | + |
| 10 | + <meta property="og:title" content="Recommended Docker Compose service field-order" /> |
| 11 | + <meta property="og:type" content="website" /> |
| 12 | + <meta property="og:url" content="https://www.explodinglabs.com/posts/" /> |
| 13 | + <meta property="og:image" content="https://www.explodinglabs.com/posts/posts/assets/opengraph.png" /> |
| 14 | + <meta property="og:image:secure_url" content="https://www.explodinglabs.com/posts/posts/assets/opengraph.png" /> |
| 15 | + <meta property="og:image:type" content="image/png" /> |
| 16 | + <meta property="og:image:width" content="1200" /> |
| 17 | + <meta property="og:image:height" content="630" /> |
| 18 | + <meta property="og:image:alt" content="Composition in architecture" /> |
| 19 | + |
| 20 | + <link rel="stylesheet" href="/posts/index.css"> |
| 21 | + <link rel="alternate" type="application/rss+xml" title="Exploding Labs" href="https://explodinglabs.com/posts/feed.xml"> |
| 22 | + <link rel="author" href="https://plus.google.com/u/0/110235318020270619650?rel=author" /> |
| 23 | + |
| 24 | + <link rel="icon" type="image/png" href="/posts/assets/favicon-16x16.png?v=2" sizes="16x16"> |
| 25 | + <link rel="icon" type="image/png" href="/posts/assets/favicon-32x32.png?v=2" sizes="32x32"> |
| 26 | + <link rel="icon" type="image/png" href="/posts/assets/favicon-96x96.png?v=2" sizes="96x96"> |
| 27 | + |
| 28 | + <link rel="apple-touch-icon" sizes="120x120" href="/posts/assets/apple-touch-icon-120x120.png?v=2"> |
| 29 | + <link rel="apple-touch-icon" sizes="152x152" href="/posts/assets/apple-touch-icon-152x152.png?v=2"> |
| 30 | + <link rel="apple-touch-icon" sizes="167x167" href="/posts/assets/apple-touch-icon-167x167.png?v=2"> |
| 31 | + <link rel="apple-touch-icon" sizes="180x180" href="/posts/assets/apple-touch-icon-180x180.png?v=2"> |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + <!-- Begin Jekyll SEO tag v2.8.0 --> |
| 36 | +<title>Recommended Docker Compose service field-order | Exploding Labs</title> |
| 37 | +<meta name="generator" content="Jekyll v4.3.4" /> |
| 38 | +<meta property="og:title" content="Recommended Docker Compose service field-order" /> |
| 39 | +<meta name="author" content="Exploding Labs" /> |
| 40 | +<meta property="og:locale" content="en_AU" /> |
| 41 | +<meta name="description" content="Recommended sequence (most common in official Compose examples and production teams):" /> |
| 42 | +<meta property="og:description" content="Recommended sequence (most common in official Compose examples and production teams):" /> |
| 43 | +<link rel="canonical" href="https://explodinglabs.com/posts/2025/07/19/recommended-compose-file-service-fields-order.html" /> |
| 44 | +<meta property="og:url" content="https://explodinglabs.com/posts/2025/07/19/recommended-compose-file-service-fields-order.html" /> |
| 45 | +<meta property="og:site_name" content="Exploding Labs" /> |
| 46 | +<meta property="og:type" content="article" /> |
| 47 | +<meta property="article:published_time" content="2025-07-19T00:00:00+00:00" /> |
| 48 | +<meta name="twitter:card" content="summary" /> |
| 49 | +<meta property="twitter:title" content="Recommended Docker Compose service field-order" /> |
| 50 | +<script type="application/ld+json"> |
| 51 | +{"@context":"https://schema.org","@type":"BlogPosting","author":{"@type":"Person","name":"Exploding Labs"},"dateModified":"2025-07-19T00:01:18+00:00","datePublished":"2025-07-19T00:00:00+00:00","description":"Recommended sequence (most common in official Compose examples and production teams):","headline":"Recommended Docker Compose service field-order","mainEntityOfPage":{"@type":"WebPage","@id":"https://explodinglabs.com/posts/2025/07/19/recommended-compose-file-service-fields-order.html"},"url":"https://explodinglabs.com/posts/2025/07/19/recommended-compose-file-service-fields-order.html"}</script> |
| 52 | +<!-- End Jekyll SEO tag --> |
| 53 | + |
| 54 | + </head> |
| 55 | + <body> |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | +<nav> |
| 61 | + <div id="logo"> |
| 62 | + <a href="https://www.explodinglabs.com/">Exploding Labs</a> |
| 63 | + </div> |
| 64 | + <div id="categories"> |
| 65 | + <a href="/posts/">All Posts</a> |
| 66 | + <span>(74)</span> |
| 67 | + |
| 68 | + <a href="/posts/jsonrpc/">JSON-RPC</a> |
| 69 | + <span>(16)</span> |
| 70 | + |
| 71 | +<!-- |
| 72 | + <a href="/posts/haskell/">Haskell</a> |
| 73 | + <span>(2)</span> |
| 74 | + |
| 75 | + <a href="/posts/python/">Python</a> |
| 76 | + <span>(19)</span> |
| 77 | +
|
| 78 | + <a href="/posts/airflow/">Airflow</a> |
| 79 | + <span>(6)</span> |
| 80 | +--> |
| 81 | + </div> |
| 82 | +</nav> |
| 83 | + |
| 84 | +<main> |
| 85 | + |
| 86 | + <article itemscope itemtype="http://schema.org/BlogPosting"> |
| 87 | + <header> |
| 88 | + <h1>Recommended Docker Compose service field-order</h1> |
| 89 | + <div class="post-meta"> |
| 90 | + <time datetime="2025-07-19T00:00:00+00:00" itemprop="datePublished"> |
| 91 | + Beau Barker, <time>Jul 19, 2025</time>. |
| 92 | + |
| 93 | + <a href="https://github.com/explodinglabs/posts/edit/main/docs/_posts/2025-07-19-recommended-compose-file-service-fields-order.markdown"> |
| 94 | + ✎ |
| 95 | + </a> |
| 96 | + </time> |
| 97 | + </div> |
| 98 | + </header> |
| 99 | + <p>Recommended sequence (most common in official Compose examples and production |
| 100 | +teams):</p> |
| 101 | + |
| 102 | +<ol> |
| 103 | + <li>image / build → What the service is</li> |
| 104 | + <li>command → How it runs (if overridden)</li> |
| 105 | + <li>ports → External access (if any)</li> |
| 106 | + <li>volumes → Data persistence</li> |
| 107 | + <li>environment → Configuration</li> |
| 108 | + <li>depends_on / links / networks → Dependencies and networking</li> |
| 109 | + <li>healthcheck → Readiness/liveness probes</li> |
| 110 | + <li>restart → Restart policy (if used)</li> |
| 111 | +</ol> |
| 112 | + |
| 113 | + <footer> |
| 114 | + <a href="/posts/">More posts</a> |
| 115 | + </footer> |
| 116 | + </article> |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | +</main> |
| 121 | + |
| 122 | + </body> |
| 123 | +</html> |
0 commit comments