-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (32 loc) · 1002 Bytes
/
Dockerfile
File metadata and controls
42 lines (32 loc) · 1002 Bytes
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
# Use the official FrankenPHP image with PHP 8.3
FROM dunglas/frankenphp:php8.5
# Install system dependencies, including Node.js
RUN apt-get update && apt-get install -y \
git \
unzip \
libsqlite3-dev \
supervisor \
sqlite3
# Install PHP extensions
RUN install-php-extensions \
pdo_sqlite \
opcache \
bcmath \
intl \
zip \
gd \
imagick
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Set working directory
WORKDIR /var/www/html
COPY . .
RUN composer install --no-interaction --prefer-dist --optimize-autoloader
# Copy the custom entrypoint script and make it executable
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 80
HEALTHCHECK --interval=5m --start-interval=30s --timeout=10s CMD curl --fail http://localhost:80/ || exit 1
# Set the entrypoint for the container
ENTRYPOINT ["entrypoint.sh"]
# FrankenPHP is started directly in the entrypoint script