-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (24 loc) · 785 Bytes
/
Copy pathDockerfile
File metadata and controls
31 lines (24 loc) · 785 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
FROM php:8.5-cli
# Install dependencies for SQLite and PHP extensions
RUN apt-get update && apt-get install -y \
libsqlite3-dev \
unzip \
&& docker-php-ext-configure pdo_sqlite --with-pdo-sqlite=/usr \
&& docker-php-ext-install pdo pdo_sqlite \
&& rm -rf /var/lib/apt/lists/*
# Install Composer
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
# Copy Composer files first for Docker layer caching
COPY composer.json composer.lock ./
# Install production dependencies only
RUN composer install \
--no-dev \
--prefer-dist \
--no-interaction \
--no-progress \
--optimize-autoloader
# Copy application
COPY . .
# Render provides the PORT environment variable
EXPOSE 10000
CMD ["sh", "-c", "php -S 0.0.0.0:${PORT:-10000} -t public"]