Updated Websources
This commit is contained in:
parent
241b83076c
commit
572817a006
11
Dockerfile_standalone_websource.Dockerfile
Normal file
11
Dockerfile_standalone_websource.Dockerfile
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
FROM python:3.10.0a7-alpine3.13
|
||||||
|
|
||||||
|
WORKDIR /Praxis
|
||||||
|
|
||||||
|
COPY requirements_sa_command.txt requirements_sa_command.txt
|
||||||
|
RUN apk add --update gcc libc-dev linux-headers && rm -rf /var/cache/apk/*
|
||||||
|
RUN pip3 install -r requirements_sa_command.txt
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
CMD [ "python3", "standalone_websource.py"]
|
||||||
@ -32,6 +32,14 @@ services:
|
|||||||
- 60809:60809
|
- 60809:60809
|
||||||
environment:
|
environment:
|
||||||
- ISDOCKER=cat
|
- ISDOCKER=cat
|
||||||
|
standalone_websource:
|
||||||
|
image: standalone_websource
|
||||||
|
volumes:
|
||||||
|
- "./:/Praxis/"
|
||||||
|
ports:
|
||||||
|
- 5500:5500
|
||||||
|
environment:
|
||||||
|
- ISDOCKER=cat
|
||||||
standalone_twitchscript:
|
standalone_twitchscript:
|
||||||
image: standalone_twitchscript
|
image: standalone_twitchscript
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@ -2,6 +2,7 @@ docker build --file Dockerfile_standalone_command.Dockerfile --tag standalone_co
|
|||||||
docker build --file Dockerfile_standalone_channelRewards.Dockerfile --tag standalone_channelrewards .
|
docker build --file Dockerfile_standalone_channelRewards.Dockerfile --tag standalone_channelrewards .
|
||||||
docker build --file Dockerfile_standalone_lights.Dockerfile --tag standalone_lights .
|
docker build --file Dockerfile_standalone_lights.Dockerfile --tag standalone_lights .
|
||||||
docker build --file Dockerfile_standalone_tts_core.Dockerfile --tag standalone_tts_core .
|
docker build --file Dockerfile_standalone_tts_core.Dockerfile --tag standalone_tts_core .
|
||||||
|
docker build --file Dockerfile_standalone_websource.Dockerfile --tag standalone_websource .
|
||||||
docker build --file Dockerfile_standalone_DiscordScript.Dockerfile --tag standalone_discordscript .
|
docker build --file Dockerfile_standalone_DiscordScript.Dockerfile --tag standalone_discordscript .
|
||||||
docker build --file Dockerfile_standalone_TwitchScript.Dockerfile --tag standalone_twitchscript .
|
docker build --file Dockerfile_standalone_TwitchScript.Dockerfile --tag standalone_twitchscript .
|
||||||
docker build --file Dockerfile_standalone_Twitch_Pubsub.Dockerfile --tag standalone_twitch_pubsub .
|
docker build --file Dockerfile_standalone_Twitch_Pubsub.Dockerfile --tag standalone_twitch_pubsub .
|
||||||
@ -20,46 +20,51 @@ import utilities_script as utility
|
|||||||
|
|
||||||
import chyron_module
|
import chyron_module
|
||||||
|
|
||||||
class webSource_Module():
|
|
||||||
webSources:Flask = Flask('webSources')
|
|
||||||
|
|
||||||
def __init__(self):
|
api:Flask = Flask(__name__)
|
||||||
super().__init__()
|
api.config["DEBUG"] = True
|
||||||
self.dbCredential: credentials.DB_Credential
|
|
||||||
|
|
||||||
def main(self, port_=5000):
|
def init():
|
||||||
print("starting up on port: ", port_)
|
print("starting up... ",)
|
||||||
self.webSources.run(host="0.0.0.0", port= port_)
|
|
||||||
|
|
||||||
@webSources.route('/')
|
|
||||||
|
@api.route('/')
|
||||||
def hello_world():
|
def hello_world():
|
||||||
return 'I can see your Ghost!'
|
return 'I can see your Ghost!'
|
||||||
|
|
||||||
@webSources.route('/chyron')
|
@api.route('/chyron')
|
||||||
def textSource_chyron():
|
def textSource_chyron():
|
||||||
tempModule = chyron_module.Chyron_Module()
|
tempModule = chyron_module.Chyron_Module()
|
||||||
return tempModule.getChyronFile()
|
return tempModule.getChyronFile()
|
||||||
|
|
||||||
@webSources.route('/temptext/<filename>/')
|
@api.route('/text/<file_name>/')
|
||||||
def textSource_tempText(filename):
|
def textSource_tempText(filename):
|
||||||
print("trying file: ", filename)
|
print("trying file: ", filename)
|
||||||
tempModule = tempText_Module.tempText_Module()
|
tempModule = tempText_Module.tempText_Module()
|
||||||
return tempModule.getTempTextFile(filename)
|
return tempModule.getTempTextFile(filename)
|
||||||
|
|
||||||
|
@api.route('/timer/<timer_name>/')
|
||||||
|
def textSource_timers(filename):
|
||||||
|
#print("trying file: ", filename)
|
||||||
|
#tempModule = tempText_Module.tempText_Module()
|
||||||
|
#tempModule.getTempTextFile(filename)
|
||||||
|
return "Coming Soon"
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
testModule = webSource_Module()
|
init()
|
||||||
testModule_2 = webSource_Module()
|
api.run(host="0.0.0.0", port = 5500)
|
||||||
threads = []
|
|
||||||
|
|
||||||
|
#testModule_2 = webSource_Module()
|
||||||
|
#threads = []
|
||||||
|
|
||||||
#credentials_manager = credentials.Credentials_Module()
|
#credentials_manager = credentials.Credentials_Module()
|
||||||
#credentials_manager.load_credentials()
|
#credentials_manager.load_credentials()
|
||||||
#testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname)
|
#testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname)
|
||||||
|
|
||||||
thread_ = threading.Thread(target=testModule.main(port_=5000))
|
#thread_ = threading.Thread(target=testModule.main(port_=6000))
|
||||||
threads.append(thread_)
|
#threads.append(thread_)
|
||||||
thread_.start()
|
#thread_.start()
|
||||||
|
|
||||||
for t in threads:
|
#for t in threads:
|
||||||
t.join()
|
#t.join()
|
||||||
Loading…
Reference in New Issue
Block a user