Private
Public Access
1
0
Files
MineSeeker/Dockerfile

55 lines
1.2 KiB
Docker
Raw Permalink Normal View History

FROM oven/bun:1-alpine AS assets
WORKDIR /app
COPY package.json bun.lock ./
RUN bun install --frozen-lockfile
COPY vite.config.js ./
COPY assets/ assets/
COPY public/ public/
RUN bun run build
FROM dunglas/frankenphp:latest
RUN install-php-extensions \
pdo_pgsql \
gd \
intl \
zip \
opcache \
apcu \
sodium
RUN apt-get update && apt-get install -y --no-install-recommends fonts-dejavu-core && rm -rf /var/lib/apt/lists/*
RUN mv "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
RUN printf '[opcache]\nopcache.enable=1\nopcache.memory_consumption=256\nopcache.max_accelerated_files=20000\nopcache.validate_timestamps=0\n' \
> "$PHP_INI_DIR/conf.d/opcache.ini"
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
ENV APP_ENV=prod
WORKDIR /app
COPY . .
RUN composer install \
--no-dev \
--no-interaction \
--no-scripts \
--optimize-autoloader
COPY --from=assets /app/public/build ./public/build
RUN mkdir -p var/cache var/log var/sessions && \
chown -R www-data:www-data var/
COPY Caddyfile /etc/caddy/Caddyfile
COPY docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]