Skip to content

Commit

Permalink
Updated docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
simba77 committed Apr 2, 2024
1 parent e4fa87d commit 5143e69
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .docker/php-fpm/Dockerfile
Expand Up @@ -7,4 +7,13 @@ RUN chmod +x /usr/local/bin/install-php-extensions && \

RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

ARG CURRENT_UID=1000
ENV CURRENT_UID ${CURRENT_UID}
ARG CURRENT_GID=1000
ENV CURRENT_GID ${CURRENT_GID}

RUN apk --no-cache add shadow && \
groupmod -o -g ${CURRENT_GID} www-data && \
usermod -o -u ${CURRENT_UID} -g www-data www-data

WORKDIR /app
8 changes: 8 additions & 0 deletions Makefile
@@ -1,6 +1,14 @@
prepare:
cp -R ./system/vendor/maximebf/debugbar/src/DebugBar/Resources/* themes/default/assets/debugbar

SHELL=/bin/bash

CURRENT_UID := $(shell id -u)
CURRENT_GID := $(shell id -g)

export CURRENT_UID
export CURRENT_GID

cms-install:
composer install
npm install
Expand Down
3 changes: 3 additions & 0 deletions docker-compose.yml
Expand Up @@ -18,6 +18,9 @@ services:
container_name: php-fpm.${APP_NAMESPACE:-johncms}
depends_on:
- mariadb
environment:
CURRENT_UID: ${CURRENT_UID:-1000}
CURRENT_GID: ${CURRENT_GID:-1000}
volumes:
- .:/app
- ./.docker/php-fpm/php.ini:/usr/local/etc/php/php.ini
Expand Down

0 comments on commit 5143e69

Please sign in to comment.