Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sofia/fixes second half course #19

Merged
merged 7 commits into from
Jul 23, 2024
Merged

Conversation

sofiiako
Copy link
Collaborator

No description provided.

@@ -15,7 +13,16 @@ import requests
data = ... # from request
response = requests.get("http://0.0.0.0:5000/items/")
```
Let's keep it that way for this task, but let's also keep in mind that
This would be totally okay if you wanted to deploy your applications locally (without Docker), however,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be totally okay if you wanted to deploy your applications locally (without Docker). However,

Instead, we can post to `http://invsys:5000/items` and ensure that our network is set up to route `invsys` to whichever IP it is hosted on.
We will come back to this later on.
You can use `0.0.0.0` for local deployment if you like, but for checking this task, we ask
you to replace it with `invsys`, so that your url looks something like this:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you to replace it with invsys, so that your URL looks something like this:

We will come back to this later on.
You can use `0.0.0.0` for local deployment if you like, but for checking this task, we ask
you to replace it with `invsys`, so that your url looks something like this:
`http://invsys:5000/items` (check out the url in the `else` clause which is already completed).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http://invsys:5000/items (check out the URL in the else clause which is already completed).

You can use `0.0.0.0` for local deployment if you like, but for checking this task, we ask
you to replace it with `invsys`, so that your url looks something like this:
`http://invsys:5000/items` (check out the url in the `else` clause which is already completed).
We will explain this in more detail in the next lesson, for now you only need to know that
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will explain this in more detail in the next lesson. For now, you only need to know that

you to replace it with `invsys`, so that your url looks something like this:
`http://invsys:5000/items` (check out the url in the `else` clause which is already completed).
We will explain this in more detail in the next lesson, for now you only need to know that
we use Docker under the hood to check these tasks, so `invsys` will be a designated name of a docker-compose service and
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we use Docker under the hood to check these tasks, so invsys will be a designated name of a Docker Compose service, and


<div class="hint">

To create the right url for getting a specific item you only need to slightly modify the get url that is already provided - add the `item_id` to it.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To create the right URL for getting a specific item, you only need to slightly modify the get URL that is already provided by adding the item_id to it.

@kochaika
Copy link
Collaborator

Here we have a Postman mention:

Test it with Postman like you did before.

https://github.com/jetbrains-academy/Flask_course_prototype/pull/19/files#diff-5fa9b6e48a152d8458d69a96f561c1bba6ecc6ecd4bf07633f9ee24e3b31121bR36

Copy link
Collaborator

@kochaika kochaika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think, here
https://github.com/jetbrains-academy/Flask_course_prototype/pull/19/files#diff-5fa9b6e48a152d8458d69a96f561c1bba6ecc6ecd4bf07633f9ee24e3b31121bR34
We can add “If you want to allow direct targeting of invsys as well, you would just need to add ports: - "5000:5000" to invsys service description.” to make it more clear

…hing_note

Add note about secure port publishing
@kochaika kochaika merged commit 2502cf9 into master Jul 23, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants