FROM php:8.1-fpm-alpine # Install nginx RUN apk add --no-cache nginx supervisor # Copy site files COPY index.html /var/www/html/ COPY styles.css /var/www/html/ COPY app.js /var/www/html/ COPY config.json /var/www/html/ COPY ticker-api.php /var/www/html/ COPY ticker-data.json /var/www/html/ # Copy favicon files COPY favicon.ico /var/www/html/ COPY favicon.svg /var/www/html/ COPY favicon-16.png /var/www/html/ COPY favicon-32.png /var/www/html/ COPY apple-touch-icon.png /var/www/html/ # Copy nginx config COPY nginx.conf /etc/nginx/http.d/default.conf # Create basic robots.txt and sitemap.xml RUN echo -e "User-agent: *\nAllow: /\n\nSitemap: /sitemap.xml" > /var/www/html/robots.txt && \ echo -e '\n\n \n https://your-domain.com/\n 2025-10-06\n weekly\n 0.8\n \n' > /var/www/html/sitemap.xml # Set permissions RUN chown -R www-data:www-data /var/www/html && \ chmod -R 644 /var/www/html/* && \ chmod 755 /var/www/html/ && \ chmod 666 /var/www/html/ticker-data.json # Create supervisor config RUN echo -e '[supervisord]\nnodaemon=true\n\n[program:php-fpm]\ncommand=php-fpm\nautostart=true\nautorestart=true\n\n[program:nginx]\ncommand=nginx -g "daemon off;"\nautostart=true\nautorestart=true' > /etc/supervisord.conf EXPOSE 80 CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]