mirror of
https://github.com/v2board/v2board.git
synced 2025-09-17 11:43:06 +08:00
feat: adds the possibility of using docker for local deployment using docker-compose.
- nginx - phpmyadmin - php v8.2 - redis - mysql - supervisor
This commit is contained in:
60
docker/Dockerfile.development
Normal file
60
docker/Dockerfile.development
Normal file
@ -0,0 +1,60 @@
|
||||
FROM php:8.2-fpm-alpine
|
||||
LABEL MAINTAINER="Vagner Cardoso <vagnercardosoweb@gmail.com>"
|
||||
|
||||
# Environments
|
||||
ENV TZ=UTC
|
||||
ENV WORKDIR=/var/www
|
||||
|
||||
# Set timezone
|
||||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
# Updates and installs system dependencies
|
||||
RUN apk add --update --no-cache \
|
||||
git \
|
||||
bash \
|
||||
curl \
|
||||
zip \
|
||||
unzip \
|
||||
vim \
|
||||
tzdata \
|
||||
libxml2-dev \
|
||||
icu-dev \
|
||||
oniguruma-dev \
|
||||
linux-headers \
|
||||
supervisor \
|
||||
$PHPIZE_DEPS && \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
# Configure php dependencies and install
|
||||
RUN docker-php-ext-configure pcntl --enable-pcntl
|
||||
RUN docker-php-ext-install fileinfo bcmath mbstring pdo_mysql intl pcntl sockets
|
||||
|
||||
# Install lib from pecl
|
||||
RUN pecl channel-update pecl.php.net \
|
||||
&& pecl install -o -f xdebug \
|
||||
&& pecl install -o -f redis \
|
||||
&& docker-php-ext-enable xdebug redis \
|
||||
&& rm -rf /tmp/pear
|
||||
|
||||
# Install composer
|
||||
COPY --from=composer:latest /usr/bin/composer /usr/bin/composer
|
||||
|
||||
# Copy php settings
|
||||
COPY ./php-ini ${PHP_INI_DIR}/conf.d
|
||||
|
||||
# Copy supervisor
|
||||
COPY ./supervisord.conf /etc/supervisord.conf
|
||||
|
||||
# Workdir
|
||||
RUN mkdir -p ${WORKDIR}
|
||||
WORKDIR ${WORKDIR}
|
||||
|
||||
# Expose port
|
||||
EXPOSE 9000
|
||||
|
||||
# Copy entrypoint
|
||||
COPY entrypoint /usr/local/bin/entrypoint
|
||||
RUN chmod +x /usr/local/bin/entrypoint
|
||||
|
||||
# Run supervisor
|
||||
CMD ["supervisord", "-c", "/etc/supervisord.conf"]
|
Reference in New Issue
Block a user