-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
26 lines (19 loc) · 816 Bytes
/
Dockerfile
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
ARG PHP_VERSION=8.2
ARG NODE_VERSION=18
FROM fideloper/fly-laravel:${PHP_VERSION} as base
# PHP_VERSION needs to be repeated here
# See https://docs.docker.com/engine/reference/builder/#understand-how-arg-and-from-interact
ARG PHP_VERSION
LABEL fly_launch_runtime="laravel"
# copy application code, skipping files based on .dockerignore
COPY . /var/www/html
RUN composer install --optimize-autoloader \
&& mkdir -p storage/logs \
&& chown -R www-data:www-data /var/www/html \
&& cp .fly/entrypoint.sh /entrypoint \
&& cp .fly/FlySymfonyRuntime.php /var/www/html/src/FlySymfonyRuntime.php \
&& rm /etc/nginx/sites-enabled/default && rsync -avz .fly/nginx/* /etc/nginx/ \
&& chmod +x /entrypoint
RUN chown -R www-data:www-data /var/www/html/public
EXPOSE 8080
ENTRYPOINT ["/entrypoint"]