File size: 963 Bytes
daa7923
 
499bdf0
 
 
 
 
 
 
2a473d1
499bdf0
 
 
 
 
690dc7d
 
 
499bdf0
 
 
 
 
 
 
 
 
 
 
 
 
 
daa7923
 
690dc7d
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
FROM php:8.2-apache

RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf \
    /etc/apache2/sites-enabled/000-default.conf

RUN apt-get update && apt-get install -y --no-install-recommends \
    sqlite3 libsqlite3-dev unzip curl \
    && rm -rf /var/lib/apt/lists/*

RUN docker-php-ext-install pdo pdo_sqlite mysqli opcache mbstring

RUN a2enmod rewrite headers

COPY api/ /var/www/api/

RUN echo 'ServerName localhost' >> /etc/apache2/apache2.conf

RUN printf '<VirtualHost *:7860>\n\
    DocumentRoot /var/www/html\n\
    Alias /api /var/www/api\n\
    <Directory /var/www/api>\n\
        Options -Indexes +FollowSymLinks\n\
        AllowOverride All\n\
        Require all granted\n\
    </Directory>\n\
    <Directory /data/sites>\n\
        Options -Indexes +FollowSymLinks\n\
        AllowOverride All\n\
        Require all granted\n\
    </Directory>\n\
</VirtualHost>\n' > /etc/apache2/sites-enabled/000-default.conf

EXPOSE 7860

CMD ["apache2-foreground"]