mirror of
https://github.com/DirectoryLister/DirectoryLister.git
synced 2025-08-29 16:50:12 +02:00
Additional updates to the Docker development environment
This commit is contained in:
18
Dockerfile
18
Dockerfile
@@ -1,12 +1,17 @@
|
||||
FROM php:8.0-apache
|
||||
LABEL maintainer="Chris Kankiewicz <Chris@ChrisKankiewicz.com>"
|
||||
|
||||
ENV COMPOSER_ALLOW_SUPERUSER=1
|
||||
ENV COMPOSER_HOME="/tmp"
|
||||
|
||||
COPY --from=composer:2.0 /usr/bin/composer /usr/bin/composer
|
||||
COPY .docker/apache/config/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
COPY .docker/php/config/php.ini /usr/local/etc/php/php.ini
|
||||
COPY --from=node:15.14 /usr/local/bin/node /usr/local/bin/node
|
||||
COPY --from=node:15.14 /usr/local/lib/node_modules /usr/local/lib/node_modules
|
||||
|
||||
RUN ln --symbolic ../lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm
|
||||
RUN ln --symbolic ../lib/node_modules/npm/bin/npx-cli.js /usr/local/bin/npx
|
||||
|
||||
ENV HOME="/tmp"
|
||||
ENV COMPOSER_ALLOW_SUPERUSER="1"
|
||||
ENV COMPOSER_HOME="/tmp"
|
||||
ENV XDG_CONFIG_HOME="/tmp/.config"
|
||||
|
||||
RUN a2enmod rewrite
|
||||
|
||||
@@ -16,3 +21,6 @@ RUN apt-get update && apt-get install --assume-yes libmemcached-dev libzip-dev \
|
||||
RUN docker-php-ext-install opcache zip \
|
||||
&& pecl install apcu memcached redis xdebug \
|
||||
&& docker-php-ext-enable apcu memcached redis xdebug
|
||||
|
||||
COPY .docker/apache/config/000-default.conf /etc/apache2/sites-available/000-default.conf
|
||||
COPY .docker/php/config/php.ini /usr/local/etc/php/php.ini
|
||||
|
@@ -4,14 +4,19 @@ services:
|
||||
app:
|
||||
container_name: directory-lister-app
|
||||
build: .
|
||||
image: directory-lister-dev:local
|
||||
depends_on:
|
||||
- memcached
|
||||
- redis
|
||||
environment:
|
||||
VIRTUAL_HOST: directory-lister.local
|
||||
ports:
|
||||
- ${APP_PORT:-80}:80
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
extra_hosts:
|
||||
- host.docker.internal:${DOCKER_HOST_IP:-172.17.0.1}
|
||||
user: ${HOST_USER_ID:-0}:${HOST_GROUP_ID:-0}
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
|
||||
memcached:
|
||||
container_name: directory-lister-memcached
|
||||
@@ -24,3 +29,11 @@ services:
|
||||
ports:
|
||||
- ${REDIS_PORT:-6379}:6379
|
||||
image: redis:6.0
|
||||
|
||||
npm:
|
||||
container_name: drectory-lister-npm
|
||||
image: directory-lister-dev:local
|
||||
volumes:
|
||||
- ./:/var/www/html
|
||||
user: ${HOST_USER_ID:-0}:${HOST_GROUP_ID:-0}
|
||||
command: npm run watch
|
||||
|
Reference in New Issue
Block a user