diff --git a/Dockerfile_standalone_channelPoints b/Dockerfile_standalone_channelPoints new file mode 100644 index 0000000..fae84ac --- /dev/null +++ b/Dockerfile_standalone_channelPoints @@ -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_channelPoints.py"] \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index 603da78..6481868 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -3,7 +3,13 @@ services: standalone_command: image: standalone_command ports: - - 5000:5000 + - 6009:6009 + environment: + - ISDOCKER=cat + standalone_channelPoints: + image: standalone_channelPoints + ports: + - 6969:6969 environment: - ISDOCKER=cat standalone_twitchscript: diff --git a/makedockerimages.bat b/makedockerimages.bat index 876b9a0..a3fbca1 100644 --- a/makedockerimages.bat +++ b/makedockerimages.bat @@ -1,4 +1,5 @@ docker build --file Dockerfile_standalone_command --tag standalone_command . +docker build --file Dockerfile_standalone_channelPoints --tag standalone_channelPoints . docker build --file Dockerfile_standalone_DiscordScript --tag standalone_discordscript . docker build --file Dockerfile_standalone_TwitchScript --tag standalone_twitchscript . docker build --file Dockerfile_standalone_Twitch_Pubsub --tag standalone_twitch_pubsub . \ No newline at end of file diff --git a/standalone_channelpoints.py b/standalone_channelpoints.py index 53a6e28..8dc8a5b 100644 --- a/standalone_channelpoints.py +++ b/standalone_channelpoints.py @@ -75,4 +75,4 @@ def exec_command(): if __name__ == '__main__': init() - api.run(host='0.0.0.0') + api.run(host='0.0.0.0', port=6969) diff --git a/standalone_command.py b/standalone_command.py index 53a6e28..3c77bcc 100644 --- a/standalone_command.py +++ b/standalone_command.py @@ -75,4 +75,4 @@ def exec_command(): if __name__ == '__main__': init() - api.run(host='0.0.0.0') + api.run(host='0.0.0.0', port=6009) diff --git a/standalone_twitch_script.py b/standalone_twitch_script.py index aba70f0..a9b8552 100644 --- a/standalone_twitch_script.py +++ b/standalone_twitch_script.py @@ -69,14 +69,14 @@ class Twitch_Module(): def is_command(self, word: str) -> bool: # todo need to url-escape word clean_param = urlencode({'name': word}) - url = "http://standalone_command:5000/api/v1/command?%s" % clean_param + url = "http://standalone_command:6009/api/v1/command?%s" % clean_param resp = requests.get(url) return resp.status_code == 200 def exec_command(self, realMessage: twitch.chat.Message, command: str, rest: str): # todo need to url-escape command and rest params = urlencode({'command_source': commands.command_base.AbstractCommand.CommandSource.Twitch,'user_name': realMessage.sender, 'command_name': command, 'rest': rest, 'bonus_data': realMessage}) - url = "http://standalone_command:5000/api/v1/exec?%s" % params + url = "http://standalone_command:6009/api/v1/exec?%s" % params resp = requests.get(url) if resp.status_code == 200: print("Got the following message: %s" % resp.text)