Skip to content

Commit

Permalink
Merge pull request #117 from local-deploy/DL-T-79
Browse files Browse the repository at this point in the history
feat(project): replacing php.ini variables in a container
  • Loading branch information
varrcan committed Jan 25, 2024
2 parents 90d74bd + 7e37b46 commit 56e5936
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion command/up.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func upRun() {

bin, option := helper.GetCompose()
Args := []string{bin}
preArgs := []string{"-p", project.Env.GetString("NETWORK_NAME"), "up", "-d"}
preArgs := []string{"-p", project.Env.GetString("NETWORK_NAME"), "--project-directory", project.Env.GetString("PWD"), "up", "-d"}

if len(option) > 0 {
Args = append(Args, option)
Expand Down
4 changes: 3 additions & 1 deletion config-files/docker-compose-apache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.8"
services:
php:
container_name: ${HOST_NAME}_php
image: ${REPO}/local-deploy/php${PHP_VERSION:-7.4-apache}:${PHP_IMAGE_VERSION:-latest}
image: ${REPO}/local-deploy/php${PHP_VERSION:-8.2-apache}:${PHP_IMAGE_VERSION:-latest}
environment:
- "DOCUMENT_ROOT=${DOCUMENT_ROOT:-/var/www/html}"
- "HOST_NAME=${HOST_NAME:-localhost}"
Expand All @@ -18,9 +18,11 @@ services:
- "XDEBUG_PORT=${XDEBUG_PORT:-9003}"
- "VIRTUAL_HOST=${HOST_NAME:-localhost}"
- "PHP_MODULES=${PHP_MODULES:-opcache}"
- "PHP_INI_SCAN_DIR=/usr/local/etc/php/conf.d:/usr/local/etc/php/conf.custom.d"
- "ENVIRONMENT=dl"
volumes:
- "${PWD}/:/var/www/html/"
- "${PHP_INI_SOURCE:-/dev/null}:/usr/local/etc/php/conf.custom.d/custom.ini:ro"
- "~/.ssh/${SSH_KEY:-id_rsa}:/var/www/.ssh/id_rsa:ro"
- "~/.ssh/known_hosts:/var/www/.ssh/known_hosts"
labels:
Expand Down
4 changes: 3 additions & 1 deletion config-files/docker-compose-fpm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: "3.8"
services:
php:
container_name: ${HOST_NAME}_php
image: ${REPO}/local-deploy/php${PHP_VERSION:-7.4-fpm}:${PHP_IMAGE_VERSION:-latest}
image: ${REPO}/local-deploy/php${PHP_VERSION:-8.2-fpm}:${PHP_IMAGE_VERSION:-latest}
environment:
- "DOCUMENT_ROOT=${DOCUMENT_ROOT:-/var/www/html}"
- "HOST_NAME=${HOST_NAME:-localhost}"
Expand All @@ -18,9 +18,11 @@ services:
- "XDEBUG_PORT=${XDEBUG_PORT:-9003}"
- "VIRTUAL_HOST=${HOST_NAME:-localhost}"
- "PHP_MODULES=${PHP_MODULES:-opcache}"
- "PHP_INI_SCAN_DIR=/usr/local/etc/php/conf.d:/usr/local/etc/php/conf.custom.d"
- "ENVIRONMENT=dl"
volumes:
- "${PWD}/:/var/www/html/"
- "${PHP_INI_SOURCE:-/dev/null}:/usr/local/etc/php/conf.custom.d/custom.ini:ro"
- "~/.ssh/${SSH_KEY:-id_rsa}:/var/www/.ssh/id_rsa:ro"
- "~/.ssh/known_hosts:/var/www/.ssh/known_hosts"
networks:
Expand Down

0 comments on commit 56e5936

Please sign in to comment.