-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* docker * docker * instalando dependências * docker bugs * docker bugs * collections postman * doc melhoria
- Loading branch information
1 parent
ec72d80
commit 4fa8fa9
Showing
5 changed files
with
210 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
{ | ||
"info": { | ||
"_postman_id": "184a292a-c4ff-4540-bc8a-a472609261c1", | ||
"name": "API - Python com flask", | ||
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", | ||
"_exporter_id": "29845617" | ||
}, | ||
"item": [ | ||
{ | ||
"name": "Home API", | ||
"request": { | ||
"auth": { | ||
"type": "noauth" | ||
}, | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "http://192.168.0.40:5000/", | ||
"protocol": "http", | ||
"host": [ | ||
"192", | ||
"168", | ||
"0", | ||
"40" | ||
], | ||
"port": "5000", | ||
"path": [ | ||
"" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Produtos cadastrados", | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"url": { | ||
"raw": "http://192.168.0.40:5000/stocks/", | ||
"protocol": "http", | ||
"host": [ | ||
"192", | ||
"168", | ||
"0", | ||
"40" | ||
], | ||
"port": "5000", | ||
"path": [ | ||
"stocks", | ||
"" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Procurar um produto", | ||
"protocolProfileBehavior": { | ||
"disableBodyPruning": true | ||
}, | ||
"request": { | ||
"method": "GET", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "" | ||
}, | ||
"url": { | ||
"raw": "http://192.168.0.40:5000/stock/ITIU4/", | ||
"protocol": "http", | ||
"host": [ | ||
"192", | ||
"168", | ||
"0", | ||
"40" | ||
], | ||
"port": "5000", | ||
"path": [ | ||
"stock", | ||
"ITIU4", | ||
"" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Novo produto", | ||
"request": { | ||
"method": "POST", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\r\n \"Name\": \"ITI BANCO DIGITAL\",\r\n \"Symbol\": \"ITIU4\",\r\n \"Price\": 6\r\n}" | ||
}, | ||
"url": { | ||
"raw": "http://192.168.0.40:5000/new/stock/", | ||
"protocol": "http", | ||
"host": [ | ||
"192", | ||
"168", | ||
"0", | ||
"40" | ||
], | ||
"port": "5000", | ||
"path": [ | ||
"new", | ||
"stock", | ||
"" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Update product price", | ||
"request": { | ||
"method": "PATCH", | ||
"header": [], | ||
"body": { | ||
"mode": "raw", | ||
"raw": "{\r\n \"Price\": 2\r\n}" | ||
}, | ||
"url": { | ||
"raw": "http://192.168.0.40:5000/stock/ITIU4/change/price/", | ||
"protocol": "http", | ||
"host": [ | ||
"192", | ||
"168", | ||
"0", | ||
"40" | ||
], | ||
"port": "5000", | ||
"path": [ | ||
"stock", | ||
"ITIU4", | ||
"change", | ||
"price", | ||
"" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
}, | ||
{ | ||
"name": "Deletar produto", | ||
"request": { | ||
"method": "DELETE", | ||
"header": [], | ||
"url": { | ||
"raw": "http://192.168.0.40:5000/stock/delete/ITIU4/", | ||
"protocol": "http", | ||
"host": [ | ||
"192", | ||
"168", | ||
"0", | ||
"40" | ||
], | ||
"port": "5000", | ||
"path": [ | ||
"stock", | ||
"delete", | ||
"ITIU4", | ||
"" | ||
] | ||
} | ||
}, | ||
"response": [] | ||
} | ||
] | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Use uma imagem base do Python | ||
FROM python:3.8 | ||
|
||
# Define o diretório de trabalho no contêiner | ||
WORKDIR /app | ||
|
||
# Copia o conteúdo do diretório atual para o diretório de trabalho | ||
COPY . /app | ||
|
||
# Instala as dependências do projeto | ||
RUN pip install -r requirements.txt | ||
|
||
# Expõe a porta que a aplicação Flask utiliza | ||
EXPOSE 5000 | ||
|
||
# Comando para executar a aplicação quando o contêiner iniciar | ||
CMD ["python", "main.py"] |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
version: "3" | ||
|
||
services: | ||
client: | ||
image: python:3.8 | ||
working_dir: /app | ||
volumes: | ||
- ./:/app | ||
ports: | ||
- "5000:5000" | ||
command: sh -c "pip install -r requirements.txt && python main.py" |