1
1
mirror of https://github.com/xodivorce/isdowndetectordown.git synced 2025-12-20 02:19:33 +05:30

refactor: added docker support and improved structure

This commit is contained in:
2025-11-21 23:03:18 +05:30
parent ebaf5cb698
commit f951a13b8e
121 changed files with 281 additions and 13460 deletions

46
Dockerfile Normal file
View File

@@ -0,0 +1,46 @@
FROM php:8.2-apache
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
nodejs \
npm \
&& docker-php-ext-install pdo_mysql mysqli
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Set working directory
WORKDIR /var/www/html
# Copy Apache configuration
COPY docker-apache.conf /etc/apache2/sites-available/000-default.conf
# Copy package.json
COPY package.json ./
# Install Node dependencies
RUN npm install
# Copy project files
COPY . .
# Set permissions
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 755 /var/www/html
# Expose port 80
EXPOSE 80
# Start script based on environment
COPY docker-entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["apache2-foreground"]