Skip to content

Commit

Permalink
#37 fix: add custom php version with env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
tanhongit committed Aug 3, 2024
1 parent 08a5b36 commit 1a3321f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ DATA_PATH=./data
LOG_PATH=./logs

# ##################### DOCKER-COMPOSE ######################
### PHP
PHP_VERSION=8.3
PHP_VERSION_SHORT=83

### NGINX
NGINX_HOST_HTTP_PORT=80
NGINX_HOST_HTTPS_PORT=443
Expand Down Expand Up @@ -63,6 +67,7 @@ BLOG_API_ROUTE_PREFIX=cs-api
## Need to change the value to sync with the value of ADMIN_DIR in the .env file of the blog-admin project.
BLOG_ADMIN_DIR=hello

### Using the command to run the frontend project
### Ex: dev, build, start,... (script in package.json)
FE_COMMAND=dev

Expand Down
6 changes: 6 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ services:
- "${NGINX_HOST_HTTP_PORT:-80}:80"
- "${NGINX_HOST_HTTPS_PORT:-443}:443"
environment:
- PHP_VERSION=${PHP_VERSION:-8.3}
- PHP_VERSION_SHORT=${PHP_VERSION_SHORT:-83}
- BLOG_DOMAIN=${BLOG_DOMAIN}
- BLOG_API_DOMAIN=${BLOG_API_DOMAIN}
- BLOG_API_ROUTE_PREFIX=${BLOG_API_ROUTE_PREFIX}
Expand All @@ -54,6 +56,8 @@ services:
- TZ=${TZ}
- USER_ID=${USER_ID:-1000}
- GROUP_ID=${GROUP_ID:-1000}
- PHP_VERSION=${PHP_VERSION:-8.3}
- PHP_VERSION_SHORT=${PHP_VERSION_SHORT:-83}
networks:
- cslant_blog
volumes:
Expand Down Expand Up @@ -160,6 +164,8 @@ services:
- TZ=${TZ}
- USER_ID=${USER_ID}
- GROUP_ID=${GROUP_ID}
- PHP_VERSION=${PHP_VERSION:-8.3}
- PHP_VERSION_SHORT=${PHP_VERSION_SHORT:-83}
networks:
- cslant_blog
volumes:
Expand Down

0 comments on commit 1a3321f

Please sign in to comment.