-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (31 loc) · 766 Bytes
/
Dockerfile
File metadata and controls
41 lines (31 loc) · 766 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
# Use official PHP image
FROM php:8.3-cli
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
unzip \
curl \
libzip-dev \
zip \
nodejs \
npm \
&& docker-php-ext-install zip \
&& rm -rf /var/lib/apt/lists/*
# Install Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
# Install PM2 globally
RUN npm install -g pm2
# Set working directory
WORKDIR /app
# Copy project files
COPY . .
# Create logs directory
RUN mkdir -p logs
# Install PHP dependencies
RUN composer install --no-interaction --prefer-dist
# Install Node dependencies
RUN npm install
# Expose dev server port
EXPOSE 8000
# Default command
CMD ["php", "stack", "start"]