mirror of
https://github.com/NyaaStudios/nyaabooru.git
synced 2025-12-10 05:42:58 +00:00
setup docker
This commit is contained in:
parent
be4c848eee
commit
d9f5e9770f
4 changed files with 57 additions and 137 deletions
35
Dockerfile
Normal file
35
Dockerfile
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
FROM php:8.4-fpm
|
||||
WORKDIR /var/www/html
|
||||
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
curl \
|
||||
libpng-dev \
|
||||
libonig-dev \
|
||||
libxml2-dev \
|
||||
libgmp-dev \
|
||||
zip \
|
||||
unzip \
|
||||
libzip-dev \
|
||||
nodejs \
|
||||
npm \
|
||||
netcat-traditional
|
||||
|
||||
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
RUN docker-php-ext-install mbstring exif pcntl bcmath gd zip gmp
|
||||
RUN pecl install mongodb && docker-php-ext-enable mongodb
|
||||
|
||||
RUN git config --global --add safe.directory /var/www/html
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
COPY docker-entrypoint.sh /usr/local/bin/
|
||||
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
||||
|
||||
COPY . /var/www/html
|
||||
|
||||
RUN composer install --optimize-autoloader --no-dev
|
||||
RUN npm install && npm run build
|
||||
|
||||
EXPOSE 9000
|
||||
ENTRYPOINT ["docker-entrypoint.sh"]
|
||||
CMD ["php-fpm"]
|
||||
Loading…
Add table
Add a link
Reference in a new issue