File tree Expand file tree Collapse file tree 15 files changed +127
-33
lines changed
Expand file tree Collapse file tree 15 files changed +127
-33
lines changed Original file line number Diff line number Diff line change @@ -6,21 +6,20 @@ ENV PHP_OPEN_BASEDIR=$WEBUSER_HOME:/config/:/dev/stdout:/tmp
66# Enable mixed ssl mode so port 80 or 443 can be used
77ENV SSL_MODE="mixed"
88
9- # Install addition packages
10- RUN apt-get update && apt-get install -y \
11- cron \
12- gnupg \
13- php8.1-gd \
14- php8.1-pgsql \
15- && apt-get clean \
16- && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
9+ # Install addition packages and cron file
10+ RUN apt-get update \
11+ && apt-get install -y --no-install-recommends cron gnupg php8.1-gd php8.1-pgsql \
12+ && echo "MAILTO=\"\"\n * * * * * webuser /usr/bin/php /var/www/html/artisan schedule:run" > /etc/cron.d/laravel
1713
1814# Install Speedtest cli
1915RUN curl -s https://packagecloud.io/install/repositories/ookla/speedtest-cli/script.deb.sh | bash \
2016 && apt-get install -y speedtest
2117
18+ # Clean up package lists
19+ RUN apt-get clean \
20+ && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
21+
2222# Copy package configs
23- COPY --chmod=644 docker/deploy/cron/scheduler /etc/cron.d/scheduler
2423COPY --chmod=755 docker/deploy/etc/s6-overlay/ /etc/s6-overlay/
2524
2625WORKDIR /var/www/html
@@ -32,7 +31,6 @@ COPY --chown=webuser:webgroup . /var/www/html
3231RUN composer install --no-interaction --prefer-dist --optimize-autoloader --no-dev \
3332 && mkdir -p storage/logs \
3433 && php artisan optimize:clear \
35- && chown -R webuser:webgroup /var/www/html \
36- && crontab /etc/cron.d/scheduler
34+ && chown -R webuser:webgroup /var/www/html
3735
3836VOLUME /config
Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ services:
2424 depends_on :
2525 - mysql
2626 - mailpit
27+ - pgsql
2728 mysql :
2829 image : ' mysql/mysql-server:8.0'
2930 ports :
@@ -55,9 +56,36 @@ services:
5556 - ' ${FORWARD_MAILPIT_DASHBOARD_PORT:-8025}:8025'
5657 networks :
5758 - sail
59+ pgsql :
60+ image : ' postgres:15'
61+ ports :
62+ - ' ${FORWARD_DB_PORT:-5432}:5432'
63+ environment :
64+ PGPASSWORD : ' ${DB_PASSWORD:-secret}'
65+ POSTGRES_DB : ' ${DB_DATABASE}'
66+ POSTGRES_USER : ' ${DB_USERNAME}'
67+ POSTGRES_PASSWORD : ' ${DB_PASSWORD:-secret}'
68+ volumes :
69+ - ' sail-pgsql:/var/lib/postgresql/data'
70+ - ' ./vendor/laravel/sail/database/pgsql/create-testing-database.sql:/docker-entrypoint-initdb.d/10-create-testing-database.sql'
71+ networks :
72+ - sail
73+ healthcheck :
74+ test :
75+ - CMD
76+ - pg_isready
77+ - ' -q'
78+ - ' -d'
79+ - ' ${DB_DATABASE}'
80+ - ' -U'
81+ - ' ${DB_USERNAME}'
82+ retries : 3
83+ timeout : 5s
5884networks :
5985 sail :
6086 driver : bridge
6187volumes :
6288 sail-mysql :
6389 driver : local
90+ sail-pgsql :
91+ driver : local
Load Diff This file was deleted.
Load Diff This file was deleted.
File renamed without changes.
Original file line number Diff line number Diff line change 11#!/command/with-contenv bash
2- echo "⏰ Starting the cron service..."
32s6-setuidgid root /usr/sbin/cron -f -l 8
Original file line number Diff line number Diff line change 1+ runas-user
2+ configure-ssl
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11#!/command/with-contenv bash
2- echo "💪 Starting the queue worker..."
32s6-setuidgid webuser php $WEBUSER_HOME/artisan queue:work --tries=3 --no-ansi -q
You can’t perform that action at this time.
0 commit comments