Skip to content

Commit

Permalink
Merge pull request #612 from paitony/611-fix-nginx-php82-volumes-www
Browse files Browse the repository at this point in the history
611 fix nginx php82 volumes www
  • Loading branch information
jingmian authored Dec 24, 2024
2 parents 33243e7 + 3d4ee66 commit b96df8e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
16 changes: 14 additions & 2 deletions bash.alias.sample
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
# dnmp alias
alias dnginx='docker exec -it nginx /bin/sh'
alias dphp='docker exec -it php /bin/sh'
alias dphp='docker exec -it php82 /bin/sh'
alias dphp56='docker exec -it php56 /bin/sh'
alias dphp54='docker exec -it php54 /bin/sh'
alias dmysql='docker exec -it mysql /bin/bash'
alias dredis='docker exec -it redis /bin/sh'

# php8 cli
php80 () {
tty=
tty -s && tty=--tty
docker run \
$tty \
--interactive \
--rm \
--volume $PWD:/www:rw \
--workdir /www \
dnmp_php php80 "$@"
}
# php7 cli
php () {
tty=
Expand All @@ -16,7 +28,7 @@ php () {
--rm \
--volume $PWD:/www:rw \
--workdir /www \
dnmp_php php "$@"
dnmp_php php74 "$@"
}

# php5.6 cli
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
- "80:80"
- "443:443"
volumes:
- ./www:/www
- ${SOURCE_DIR}:/www/:rw
- ./services/nginx/ssl:/ssl
- ./services/nginx/conf.d:/etc/nginx/conf.d
- ./services/nginx/nginx.conf:/etc/nginx/nginx.conf
Expand All @@ -30,7 +30,7 @@ services:
expose:
- 9501
volumes:
- ./www:/www
- ${SOURCE_DIR}:/www/:rw
- ./services/php82/php.ini:/usr/local/etc/php/php.ini
- ./services/php82/php-fpm.conf:/usr/local/etc/php-fpm.d/www.conf
- ./logs/php82:/var/log/php
Expand Down

0 comments on commit b96df8e

Please sign in to comment.