<h3 dir="auto">Description</h3>
<p dir="auto">Configures the <code class="notranslate">web</code> service in <code class="notranslate">docker-compose.yml</code> file to allow for interactive debugging. <code class="notranslate">tty</code> allocates a pseudo terminal while <code class="notranslate">stdin_open</code> runs the container with stdin. Running <code class="notranslate">docker attach WEB_CONTAINER_ID</code> connects to the running container where the debugger can be interacted with.</p>
<p dir="auto">One alternative is to run <code class="notranslate">docker-compose run --rm --service-ports -it web bash</code> and then <code class="notranslate">bundle exec rails s -p 3000 -b '0.0.0.0'</code> inside the container. However, I think leaning into <code class="notranslate">docker-compose.yml</code> makes sense here — we get consistent terminal behavior as a default when running <code class="notranslate">docker compose up</code> and <code class="notranslate">docker attach</code>.</p>
<h3 dir="auto">How has this been tested?</h3>
<p dir="auto">I ran <code class="notranslate">docker-compose up</code> and then in a separate terminal ran <code class="notranslate">docker attach WEB_CONTAINER_ID</code>. When I hit a <code class="notranslate">debugger</code> I can then step through the code.</p>
<hr>
<h4>You can view, comment on, or merge this pull request online at:</h4>
<p> <a href='https://github.com/openstreetmap/openstreetmap-website/pull/5851'>https://github.com/openstreetmap/openstreetmap-website/pull/5851</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5851/commits/fe0d514d608b4870d8d56a4d80cc3a0a9f956f63" class="commit-link">fe0d514</a> Support interactive debugger</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5851/files">1 file</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5851/files#diff-e45e45baeda1c1e73482975a664062aa56f20c03dd9d64a827aba57775bed0d3">docker-compose.yml</a>
(2)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5851.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5851.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5851.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5851.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5851">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLINAR7JKQ6QUP45MF32WNHLBAVCNFSM6AAAAABZ3XEFMKVHI2DSMVQWIX3LMV43ASLTON2WKOZSHE2TCMJWGU4DSNY">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLITZKQ7ZEYXDUTEMZ32WNHLBA5CNFSM6AAAAABZ3XEFMKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHK7ZZXZE.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5851</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5851",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5851",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>