forked from BAWES-Universe/studenthub
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile-apache
More file actions
60 lines (47 loc) · 1.37 KB
/
Dockerfile-apache
File metadata and controls
60 lines (47 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Use an official PHP image with Apache
FROM php:8.2-apache
# Install required PHP extensions
RUN apt-get update && apt-get install -y \
libtool \
libfdk-aac-dev \
libass-dev \
libvpx-dev \
libopus-dev \
libx264-dev \
libpng-dev \
libjpeg-dev \
libfreetype6-dev \
libzip-dev \
unzip \
git \
ffmpeg \
cron \
&& docker-php-ext-configure gd --with-freetype --with-jpeg \
&& docker-php-ext-install gd pdo pdo_mysql zip opcache exif
# Install PHP dependencies
RUN pecl install ffmpeg \
&& docker-php-ext-enable ffmpeg
# Enable Apache mod_rewrite
RUN a2enmod rewrite
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
# Set working directory in the container
WORKDIR /var/www/html
# Copy application files to the container
COPY . /var/www/html
# Set permissions for the web server
RUN chown -R www-data:www-data /var/www/html \
&& chmod -R 775 /var/www/html
RUN cd /var/www/html
# Install FFMpeg PHP Library via Composer
#COPY composer.json /var/www/html
RUN composer install --no-dev
#RUN ./init --env=Krushn --overwrite=All
#RUN ./yii migrate
COPY cron/cronlist /etc/cron.d/cronlist
RUN chmod 0644 /etc/cron.d/cronlist
RUN crontab /etc/cron.d/cronlist
# Expose port 80
EXPOSE 80
# Set the entry point
CMD ["apache2-foreground"]