Emalawi19 commited on
Commit
daa7923
·
verified ·
1 Parent(s): 2af653d

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +48 -0
Dockerfile ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM php:8.2-apache
2
+
3
+ # System dependencies
4
+ RUN apt-get update && apt-get install -y --no-install-recommends \
5
+ libpng-dev \
6
+ libjpeg-dev \
7
+ libfreetype6-dev \
8
+ libzip-dev \
9
+ libicu-dev \
10
+ libxml2-dev \
11
+ sqlite3 \
12
+ libsqlite3-dev \
13
+ unzip \
14
+ curl \
15
+ && rm -rf /var/lib/apt/lists/*
16
+
17
+ # PHP extensions
18
+ RUN docker-php-ext-configure gd --with-freetype --with-jpeg \
19
+ && docker-php-ext-install -j"$(nproc)" \
20
+ gd \
21
+ pdo \
22
+ pdo_sqlite \
23
+ mysqli \
24
+ zip \
25
+ intl \
26
+ opcache \
27
+ mbstring \
28
+ xml
29
+
30
+ # Apache modules
31
+ RUN a2enmod rewrite vhost_alias headers
32
+
33
+ # Copy config files
34
+ COPY config/php.ini /usr/local/etc/php/conf.d/99-custom.ini
35
+ COPY config/apache.conf /etc/apache2/sites-available/platform.conf
36
+ COPY entrypoint.sh /entrypoint.sh
37
+
38
+ # Copy backend PHP API files
39
+ COPY api/ /var/www/api/
40
+
41
+ # Enable our site, disable default
42
+ RUN a2dissite 000-default && a2ensite platform
43
+
44
+ RUN chmod +x /entrypoint.sh
45
+
46
+ EXPOSE 7860
47
+
48
+ CMD ["/entrypoint.sh"]