fix: use pre-built wintercms image, only copy theme+plugin
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
Some checks are pending
Module sub-split / Sub-split (push) Waiting to run
This commit is contained in:
48
Dockerfile
48
Dockerfile
@@ -1,45 +1,13 @@
|
||||
FROM php:8.2-apache-bookworm
|
||||
FROM ghcr.io/mpo-web-consulting/wintercms:8.2-apache-v1.2.4
|
||||
|
||||
LABEL coolify.managed=true
|
||||
LABEL maintainer="VivesPOS"
|
||||
COPY themes/vivespos /var/www/html/themes/vivespos
|
||||
COPY plugins/vivespos /var/www/html/plugins/vivespos
|
||||
|
||||
ENV APACHE_DOCUMENT_ROOT=/var/www/html
|
||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||
ENV CMS_ACTIVE_THEME=vivespos
|
||||
ENV INIT_WINTER=true
|
||||
ENV APP_URL=http://www.vivespos.com
|
||||
ENV APP_DEBUG=false
|
||||
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libpng-dev libjpeg-dev libfreetype6-dev libzip-dev libsqlite3-dev libonig-dev \
|
||||
unzip git curl && \
|
||||
docker-php-ext-configure gd --with-freetype --with-jpeg && \
|
||||
docker-php-ext-install gd zip pdo_sqlite pdo_mysql mbstring exif opcache && \
|
||||
a2enmod rewrite headers expires && \
|
||||
curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
|
||||
apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' \
|
||||
/etc/apache2/sites-available/*.conf && \
|
||||
sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' \
|
||||
/etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf && \
|
||||
printf '<Directory ${APACHE_DOCUMENT_ROOT}>\n AllowOverride All\n Require all granted\n</Directory>\n' \
|
||||
> /etc/apache2/conf-available/vivespos.conf && \
|
||||
a2enconf vivespos
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN composer install --no-dev --optimize-autoloader --no-interaction
|
||||
|
||||
RUN cp .env.example .env && \
|
||||
php artisan key:generate --force && \
|
||||
touch storage/database.sqlite && \
|
||||
php artisan winter:up --force && \
|
||||
chown -R www-data:www-data /var/www/html && \
|
||||
chmod -R 755 /var/www/html && \
|
||||
chmod -R 777 storage bootstrap/cache themes plugins
|
||||
RUN chown -R www-data:www-data /var/www/html/themes/vivespos /var/www/html/plugins/vivespos
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD curl -f http://localhost:80/ || exit 1
|
||||
|
||||
CMD ["apache2-foreground"]
|
||||
|
||||
Reference in New Issue
Block a user