Last active
June 16, 2020 09:53
-
-
Save alex-oleshkevich/6695124d41208c5dc692a30ea817ea82 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
app: | |
image: nginx | |
not_in_list: | |
image: nginx | |
client: | |
image: httpx_client | |
build: . | |
depends_on: [app] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.8-slim | |
RUN pip install httpx | |
WORKDIR /code | |
ADD ./main.py /code/main.py | |
CMD python /code/main.py |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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