Add Docker Compose production stack (php-apache, mariadb, node/pm2)
Single-command deploy: docker compose up -d --build brings up the LEMP stack plus the Node realtime/scheduler service. app/config.php and DB secrets are generated from .env at container start, never baked into the image or committed.
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
FROM php:8.3-apache
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libzip-dev libicu-dev libonig-dev default-mysql-client gettext-base \
|
||||
&& docker-php-ext-install pdo_mysql mysqli mbstring gd zip intl sockets exif opcache \
|
||||
&& a2enmod rewrite \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY docker/php/opcache.ini /usr/local/etc/php/conf.d/opcache-recommended.ini
|
||||
COPY docker/php/entrypoint.sh /usr/local/bin/docker-entrypoint-wms.sh
|
||||
COPY docker/php/config.php.template /usr/local/etc/wms/config.php.template
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint-wms.sh
|
||||
|
||||
WORKDIR /var/www/html/wms-app
|
||||
|
||||
ENTRYPOINT ["docker-entrypoint-wms.sh"]
|
||||
CMD ["apache2-foreground"]
|
||||
Reference in New Issue
Block a user