modified docker structure

This commit is contained in:
Lukian 2024-12-28 16:58:59 +01:00
parent e2d8d04c04
commit 8f11c56d1a
5 changed files with 37 additions and 4 deletions

View file

@ -6,7 +6,7 @@ HOST = "http://localhost:3000/"
input :
- idComp : Identifiant de l'entreprise
"""
def showShares(idComp):
def getShares(idComp):
url = HOST + 'api/companies/'+idComp+'/shares'
r = requests.get(url)
return r.json()
@ -16,7 +16,7 @@ def showShares(idComp):
- idComp : identifiant de l'entreprise
- price : prix de l'action sur le marché
"""
def newShare(idComp, price):
def emmitShare(idComp, price):
url = HOST + 'api/shares/emmit'
obj={'id':idComp,'price':price}
r = requests.post(url, json=obj)
@ -26,13 +26,13 @@ def newShare(idComp, price):
input :
- idComp : identifiant de l'entreprise
"""
def showInfoComp(idComp):
def getCompany(idComp):
url = HOST + 'api/companies/'+idComp
r=requests.get(url)
return r.json()
"""Affichage les enteprises """
def showComp():
def getCompanies():
url = HOST + 'api/companies/'
r=requests.get(url)
return r.json()

33
client/docker-compose.yml Normal file
View 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