-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
24 lines (18 loc) · 851 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
ARG PHP_VERSION=8.2
FROM fideloper/fly-laravel:${PHP_VERSION} as base
ARG PHP_VERSION
LABEL fly_launch_runtime="laravel"
# Copy composer files
COPY composer.json composer.lock /var/www/html/
# Install dependencies
RUN curl -sSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | tee /etc/apt/trusted.gpg.d/pgdg.asc >/dev/null \
&& echo "deb http://apt.postgresql.org/pub/repos/apt focal-pgdg main" | tee /etc/apt/sources.list.d/pgdg.list \
&& apt update \
&& apt install -y postgresql-client-14 mysql-client \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/* \
&& composer install --optimize-autoloader --no-dev \
&& echo 'cd /var/www/html' >> /.bashrc
# Copy the rest of the application
COPY . /var/www/html
ENTRYPOINT ["/usr/bin/php", "/var/www/html/artisan", "schedule:work"]