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
|
||||
environment:
|
||||
- ISDOCKER=cat
|
||||
standalone_websource:
|
||||
image: standalone_websource
|
||||
volumes:
|
||||
- "./:/Praxis/"
|
||||
ports:
|
||||
- 5500:5500
|
||||
environment:
|
||||
- ISDOCKER=cat
|
||||
standalone_twitchscript:
|
||||
image: standalone_twitchscript
|
||||
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_lights.Dockerfile --tag standalone_lights .
|
||||
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_TwitchScript.Dockerfile --tag standalone_twitchscript .
|
||||
docker build --file Dockerfile_standalone_Twitch_Pubsub.Dockerfile --tag standalone_twitch_pubsub .
|
||||
@ -20,46 +20,51 @@ import utilities_script as utility
|
||||
|
||||
import chyron_module
|
||||
|
||||
class webSource_Module():
|
||||
webSources:Flask = Flask('webSources')
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
self.dbCredential: credentials.DB_Credential
|
||||
api:Flask = Flask(__name__)
|
||||
api.config["DEBUG"] = True
|
||||
|
||||
def main(self, port_=5000):
|
||||
print("starting up on port: ", port_)
|
||||
self.webSources.run(host="0.0.0.0", port= port_)
|
||||
def init():
|
||||
print("starting up... ",)
|
||||
|
||||
@webSources.route('/')
|
||||
|
||||
@api.route('/')
|
||||
def hello_world():
|
||||
return 'I can see your Ghost!'
|
||||
|
||||
@webSources.route('/chyron')
|
||||
@api.route('/chyron')
|
||||
def textSource_chyron():
|
||||
tempModule = chyron_module.Chyron_Module()
|
||||
return tempModule.getChyronFile()
|
||||
|
||||
@webSources.route('/temptext/<filename>/')
|
||||
@api.route('/text/<file_name>/')
|
||||
def textSource_tempText(filename):
|
||||
print("trying file: ", filename)
|
||||
tempModule = tempText_Module.tempText_Module()
|
||||
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__":
|
||||
testModule = webSource_Module()
|
||||
testModule_2 = webSource_Module()
|
||||
threads = []
|
||||
init()
|
||||
api.run(host="0.0.0.0", port = 5500)
|
||||
|
||||
|
||||
#testModule_2 = webSource_Module()
|
||||
#threads = []
|
||||
|
||||
#credentials_manager = credentials.Credentials_Module()
|
||||
#credentials_manager.load_credentials()
|
||||
#testModule.dbCredential = credentials_manager.find_DB_Credential(config.credentialsNickname)
|
||||
|
||||
thread_ = threading.Thread(target=testModule.main(port_=5000))
|
||||
threads.append(thread_)
|
||||
thread_.start()
|
||||
#thread_ = threading.Thread(target=testModule.main(port_=6000))
|
||||
#threads.append(thread_)
|
||||
#thread_.start()
|
||||
|
||||
for t in threads:
|
||||
t.join()
|
||||
#for t in threads:
|
||||
#t.join()
|
||||
Loading…
Reference in New Issue
Block a user