generated from lucien/api-template
modified docker structure
This commit is contained in:
parent
e2d8d04c04
commit
8f11c56d1a
5 changed files with 37 additions and 4 deletions
|
@ -6,7 +6,7 @@ HOST = "http://localhost:3000/"
|
||||||
input :
|
input :
|
||||||
- idComp : Identifiant de l'entreprise
|
- idComp : Identifiant de l'entreprise
|
||||||
"""
|
"""
|
||||||
def showShares(idComp):
|
def getShares(idComp):
|
||||||
url = HOST + 'api/companies/'+idComp+'/shares'
|
url = HOST + 'api/companies/'+idComp+'/shares'
|
||||||
r = requests.get(url)
|
r = requests.get(url)
|
||||||
return r.json()
|
return r.json()
|
||||||
|
@ -16,7 +16,7 @@ def showShares(idComp):
|
||||||
- idComp : identifiant de l'entreprise
|
- idComp : identifiant de l'entreprise
|
||||||
- price : prix de l'action sur le marché
|
- price : prix de l'action sur le marché
|
||||||
"""
|
"""
|
||||||
def newShare(idComp, price):
|
def emmitShare(idComp, price):
|
||||||
url = HOST + 'api/shares/emmit'
|
url = HOST + 'api/shares/emmit'
|
||||||
obj={'id':idComp,'price':price}
|
obj={'id':idComp,'price':price}
|
||||||
r = requests.post(url, json=obj)
|
r = requests.post(url, json=obj)
|
||||||
|
@ -26,13 +26,13 @@ def newShare(idComp, price):
|
||||||
input :
|
input :
|
||||||
- idComp : identifiant de l'entreprise
|
- idComp : identifiant de l'entreprise
|
||||||
"""
|
"""
|
||||||
def showInfoComp(idComp):
|
def getCompany(idComp):
|
||||||
url = HOST + 'api/companies/'+idComp
|
url = HOST + 'api/companies/'+idComp
|
||||||
r=requests.get(url)
|
r=requests.get(url)
|
||||||
return r.json()
|
return r.json()
|
||||||
|
|
||||||
"""Affichage les enteprises """
|
"""Affichage les enteprises """
|
||||||
def showComp():
|
def getCompanies():
|
||||||
url = HOST + 'api/companies/'
|
url = HOST + 'api/companies/'
|
||||||
r=requests.get(url)
|
r=requests.get(url)
|
||||||
return r.json()
|
return r.json()
|
33
client/docker-compose.yml
Normal file
33
client/docker-compose.yml
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
services:
|
||||||
|
companies:
|
||||||
|
build: ./company
|
||||||
|
container_name: companies
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- bourse
|
||||||
|
|
||||||
|
shareholder1:
|
||||||
|
build: ./shareholder
|
||||||
|
container_name: shareholder1
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- bourse
|
||||||
|
|
||||||
|
shareholder2:
|
||||||
|
build: ./shareholder
|
||||||
|
container_name: shareholder2
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- bourse
|
||||||
|
|
||||||
|
shareholder3:
|
||||||
|
build: ./shareholder
|
||||||
|
container_name: shareholder3
|
||||||
|
restart: always
|
||||||
|
networks:
|
||||||
|
- bourse
|
||||||
|
|
||||||
|
networks:
|
||||||
|
bourse:
|
||||||
|
driver: bridge
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue