Skip to content

Instantly share code, notes, and snippets.

@alex-oleshkevich
Last active June 16, 2020 09:53
Show Gist options
  • Save alex-oleshkevich/6695124d41208c5dc692a30ea817ea82 to your computer and use it in GitHub Desktop.
Save alex-oleshkevich/6695124d41208c5dc692a30ea817ea82 to your computer and use it in GitHub Desktop.
version: '3'
services:
app:
image: nginx
not_in_list:
image: nginx
client:
image: httpx_client
build: .
depends_on: [app]
FROM python:3.8-slim
RUN pip install httpx
WORKDIR /code
ADD ./main.py /code/main.py
CMD python /code/main.py
import httpx, time
time.sleep(2)
response = httpx.get('http://not_in_list')
print(response.status_code)
response = httpx.get('http://app')
print(response.status_code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment