Skip to content

Commit a71134b

Browse files
committed
Laravel ready 🚀
1 parent 15dba68 commit a71134b

File tree

3 files changed

+17
-6
lines changed

3 files changed

+17
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/.idea/

Dockerfile

+13-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ WORKDIR /var/www/html
99
RUN apk add --no-cache \
1010
curl \
1111
nginx \
12+
redis \
1213
php81 \
1314
php81-ctype \
1415
php81-curl \
@@ -17,15 +18,22 @@ RUN apk add --no-cache \
1718
php81-gd \
1819
php81-intl \
1920
php81-mbstring \
20-
php81-mysqli \
21+
php81-pgsql \
2122
php81-opcache \
2223
php81-openssl \
2324
php81-phar \
2425
php81-session \
2526
php81-xml \
2627
php81-xmlreader \
28+
php81-xmlwriter \
29+
php81-fileinfo \
30+
php81-simplexml \
31+
php81-tokenizer \
32+
php81-exif \
33+
php81-pcntl \
34+
php81-posix \
35+
php81-redis \
2736
supervisor
28-
2937
# Create symlink so programs depending on `php` still function
3038
RUN ln -s /usr/bin/php81 /usr/bin/php
3139

@@ -45,9 +53,6 @@ RUN chown -R nobody.nobody /var/www/html /run /var/lib/nginx /var/log/nginx
4553
# Switch to use a non-root user from here on
4654
USER nobody
4755

48-
# Add application
49-
COPY --chown=nobody src/ /var/www/html/
50-
5156
# Expose the port nginx is reachable on
5257
EXPOSE 8080
5358

@@ -56,3 +61,6 @@ CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
5661

5762
# Configure a healthcheck to validate that everything is up&running
5863
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping
64+
65+
# Install composer from the official image
66+
COPY --from=composer /usr/bin/composer /usr/bin/composer

config/nginx.conf

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ http {
3838
tcp_nodelay on;
3939
absolute_redirect off;
4040

41-
root /var/www/html;
41+
root /var/www/html/public;
4242
index index.php index.html;
4343

4444
location / {
@@ -53,6 +53,8 @@ http {
5353
root /var/lib/nginx/html;
5454
}
5555

56+
client_max_body_size 100M;
57+
5658
# Pass the PHP scripts to PHP-FPM listening on php-fpm.sock
5759
location ~ \.php$ {
5860
try_files $uri =404;

0 commit comments

Comments
 (0)