FROM nginx:1.27-alpine

RUN apk add --no-cache python3

COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY index.html /usr/share/nginx/html/index.html
COPY login.html /usr/share/nginx/html/login.html
COPY styles.css /usr/share/nginx/html/styles.css
COPY app.js /usr/share/nginx/html/app.js
COPY backend.py /app/backend.py

EXPOSE 80

CMD ["/bin/sh", "-lc", "python3 /app/backend.py & exec nginx -g 'daemon off;'"]
