-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
40 lines (31 loc) · 988 Bytes
/
Dockerfile
File metadata and controls
40 lines (31 loc) · 988 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
# Use the official Nginx image as the base image
FROM nginx:latest
# Remove default Nginx configuration
RUN rm /etc/nginx/conf.d/default.conf
# Copy custom Nginx configuration
COPY nginx/nginx.conf /etc/nginx/nginx.conf
# Set up PHP-FPM and PHP extensions required by Lumen
RUN apt-get update && apt-get install -y \
sqlite3 \
php8.2 \
php8.2-sqlite3 \
php8.2-fpm \
php8.2-mbstring \
php8.2-bcmath \
php8.2-curl \
php8.2-intl \
php8.2-xml \
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Set the working directory
WORKDIR /var/www/html
# Copy the Laravel application into the container
COPY . /var/www/html
# Allow writing to the SQLite database file
RUN chmod -R 755 /var/www/html/database/skimpy.sqlite
# Set Laravel/Lumen storage permissions
RUN chown -R www-data:www-data /var/www/html
RUN chmod -R 755 /var/www/html/storage
# Expose port 80
EXPOSE 80
# Start PHP-FPM and Nginx
CMD service php8.2-fpm start && nginx -g "daemon off;"