2025-01-10 00:14:53 -05:00
|
|
|
FROM phpswoole/swoole:php8.2-alpine
|
2023-11-17 01:44:01 -05:00
|
|
|
|
|
|
|
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
|
2025-01-10 16:28:43 -05:00
|
|
|
RUN install-php-extensions pcntl bcmath zip redis \
|
2025-01-10 01:20:41 -05:00
|
|
|
&& apk --no-cache add shadow sqlite mysql-client mysql-client mysql-dev mariadb-connector-c git patch supervisor redis \
|
2025-01-09 22:04:12 -05:00
|
|
|
&& addgroup -S -g 1000 www && adduser -S -G www -u 1000 www \
|
|
|
|
&& (getent group redis || addgroup -S redis) \
|
|
|
|
&& (getent passwd redis || adduser -S -G redis -H -h /data redis)
|
|
|
|
|
2023-11-17 01:44:01 -05:00
|
|
|
WORKDIR /www
|
|
|
|
COPY .docker /
|
|
|
|
COPY . /www
|
2025-01-09 22:04:12 -05:00
|
|
|
COPY .docker/supervisor/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
|
|
|
|
2023-11-17 01:44:01 -05:00
|
|
|
RUN composer install --optimize-autoloader --no-cache --no-dev \
|
2025-01-06 12:20:11 -05:00
|
|
|
&& php artisan storage:link \
|
|
|
|
&& chown -R www:www /www \
|
2025-01-09 22:04:12 -05:00
|
|
|
&& chmod -R 775 /www \
|
|
|
|
&& mkdir -p /data \
|
|
|
|
&& chown redis:redis /data
|
|
|
|
|
2025-01-15 06:12:50 -05:00
|
|
|
ENV ENABLE_WEB=true \
|
|
|
|
ENABLE_HORIZON=true \
|
2025-01-16 01:05:40 -05:00
|
|
|
ENABLE_REDIS=false
|
2025-01-19 08:13:09 -05:00
|
|
|
|
|
|
|
EXPOSE 7001
|
2025-01-09 22:04:12 -05:00
|
|
|
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]
|