Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update coolify docker images #449

Merged
merged 1 commit into from
Sep 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 16 additions & 31 deletions coolify.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,36 +1,12 @@
FROM dunglas/frankenphp as builder

ARG NODE_VERSION=20.9.0
# Install system dependencies
RUN apt-get update && apt-get install -y \
git \
curl \
libpng-dev \
libonig-dev \
libxml2-dev \
zip \
unzip \
cron \
default-mysql-client
# Clear cache
RUN apt-get clean && rm -rf /var/lib/apt/lists/* && \
# Install PHP extensions
docker-php-ext-install pdo_mysql mbstring exif pcntl bcmath gd && \
#install mailparse
pecl install mailparse && \
echo extension=mailparse.so > /usr/local/etc/php/conf.d/mailparse.ini && \
echo "max_execution_time=900" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer

RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist

FROM node:${NODE_VERSION}-alpine as static-assets

RUN apk add --no-cache gcompat
WORKDIR /app
COPY . .
COPY --from=builder --chown=9999:9999 /app /app
RUN npm install
RUN npm run build

COPY . /app

RUN yarn install --frozen-lockfile && yarn && yarn build && npm prune --production

FROM dunglas/frankenphp as server

Expand Down Expand Up @@ -63,4 +39,13 @@ echo "max_execution_time=900" >> /usr/local/etc/php/conf.d/docker-php-ext-xdebug

# Get latest Composer
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
COPY --from=builder --chown=user:group /app /app
RUN composer install --no-dev --no-interaction --no-plugins --no-scripts --prefer-dist

COPY --from=static-assets --chown=9999:9999 /app/public/build ./public/build

RUN php artisan route:cache
RUN php artisan view:cache

RUN echo "alias ll='ls -al'" >>/etc/bash.bashrc
RUN echo "alias a='php artisan'" >>/etc/bash.bashrc
RUN echo "alias logs='tail -f storage/logs/laravel.log'" >>/etc/bash.bashrc
8 changes: 0 additions & 8 deletions docker-compose.coolify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@ services:
MERCURE_EXTRA_DIRECTIVES: |-
cors_origins "*"
anonymous
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- ./docker-compose/redis:/data
networks:
- loger
networks:
loger:
driver: bridge
Loading