forked from alexjustesen/speedtest-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (33 loc) · 1.13 KB
/
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM serversideup/php:8.2-fpm-nginx
# Add /config to allowed directory tree
ENV PHP_OPEN_BASEDIR=$WEBUSER_HOME:/config/:/dev/stdout:/tmp
# Enable mixed ssl mode so port 80 or 443 can be used
ENV SSL_MODE="mixed"
# Install addition packages and cron file
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
cron \
htop \
php8.2-pgsql \
&& echo "MAILTO=\"\"\n* * * * * webuser /usr/bin/php /var/www/html/artisan schedule:run" > /etc/cron.d/laravel \
\
# Install Speedtest cli
&& curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash \
&& apt-get install -y --no-install-recommends speedtest \
\
# Clean up package lists
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
# Copy package configs
COPY --chmod=755 docker/deploy/etc/s6-overlay/ /etc/s6-overlay/
# Copy app
COPY --chown=webuser:webgroup . $WEBUSER_HOME
WORKDIR $WEBUSER_HOME
# Install app dependencies
RUN composer install \
--no-interaction \
--prefer-dist \
--optimize-autoloader \
--no-dev \
--no-cache
VOLUME /config