Compare commits

..

No commits in common. "5d6138bdc27df59afaff72bd8a67e32a152cde53" and "564e449e3300a976daadc963cbeac5cce5e48e8e" have entirely different histories.

3 changed files with 3 additions and 32 deletions

View File

@ -1,23 +0,0 @@
FROM python:3.13-slim-bookworm AS build
WORKDIR /santa
RUN mkdir -p /santa/WebServer/static
COPY setup-server.sh /santa/setup-server.sh
RUN apt-get update && apt-get install -y curl bzip2
RUN /santa/setup-server.sh --download-only
COPY requirements.txt /santa/requirements.txt
COPY src/setup.py /santa/src/setup.py
COPY src/SantaExchange/ /santa/src/SantaExchange/
RUN pip install -r /santa/requirements.txt
RUN /santa/setup-server.sh
FROM python:3.13-slim-bookworm
RUN pip install flask flask-socketio gunicorn eventlet
COPY --from=build /santa/WebServer /WebServer
COPY WebServer/__init__.py WebServer/server.py /WebServer/
COPY WebServer/templates/ /WebServer/templates/
COPY WebServer/static/exchange_client.py WebServer/static/exchange_worker.js WebServer/static/style.css /WebServer/static/
WORKDIR /WebServer
EXPOSE 8000
CMD ["gunicorn", "--worker-class", "eventlet", "-w", "1", "--bind", "0.0.0.0:8000", "server:app"]

View File

@ -1,13 +1,11 @@
import os
import json
from collections import defaultdict
from flask import Flask, render_template
from flask_socketio import SocketIO, join_room, leave_room, send
app = Flask(__name__)
if 'CORS_ORIGIN' in os.environ and os.environ['CORS_ORIGIN'] is not None:
socketio = SocketIO(app, cors_allowed_origins=[os.environ['CORS_ORIGIN']])
else:
socketio = SocketIO(app)
socketio = SocketIO(app)
if __name__ == 'main':
socketio.run(app)

View File

@ -17,10 +17,6 @@ if ! test -f ./WebServer/static/socket.io.min.js; then
fi
echo "Socket.io is installed"
if [[ "$1" == "--download-only" ]]; then
exit 0
fi
echo "Building wheel file of SantaExchange package"
cd src/
python setup.py bdist_wheel