Skip to content

Commit 1a3321f

Browse files
committed
#37 fix: add custom php version with env variables
1 parent 08a5b36 commit 1a3321f

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

.env.example

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ DATA_PATH=./data
1919
LOG_PATH=./logs
2020

2121
# ##################### DOCKER-COMPOSE ######################
22+
### PHP
23+
PHP_VERSION=8.3
24+
PHP_VERSION_SHORT=83
25+
2226
### NGINX
2327
NGINX_HOST_HTTP_PORT=80
2428
NGINX_HOST_HTTPS_PORT=443
@@ -63,6 +67,7 @@ BLOG_API_ROUTE_PREFIX=cs-api
6367
## Need to change the value to sync with the value of ADMIN_DIR in the .env file of the blog-admin project.
6468
BLOG_ADMIN_DIR=hello
6569

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

docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ services:
2828
- "${NGINX_HOST_HTTP_PORT:-80}:80"
2929
- "${NGINX_HOST_HTTPS_PORT:-443}:443"
3030
environment:
31+
- PHP_VERSION=${PHP_VERSION:-8.3}
32+
- PHP_VERSION_SHORT=${PHP_VERSION_SHORT:-83}
3133
- BLOG_DOMAIN=${BLOG_DOMAIN}
3234
- BLOG_API_DOMAIN=${BLOG_API_DOMAIN}
3335
- BLOG_API_ROUTE_PREFIX=${BLOG_API_ROUTE_PREFIX}
@@ -54,6 +56,8 @@ services:
5456
- TZ=${TZ}
5557
- USER_ID=${USER_ID:-1000}
5658
- GROUP_ID=${GROUP_ID:-1000}
59+
- PHP_VERSION=${PHP_VERSION:-8.3}
60+
- PHP_VERSION_SHORT=${PHP_VERSION_SHORT:-83}
5761
networks:
5862
- cslant_blog
5963
volumes:
@@ -160,6 +164,8 @@ services:
160164
- TZ=${TZ}
161165
- USER_ID=${USER_ID}
162166
- GROUP_ID=${GROUP_ID}
167+
- PHP_VERSION=${PHP_VERSION:-8.3}
168+
- PHP_VERSION_SHORT=${PHP_VERSION_SHORT:-83}
163169
networks:
164170
- cslant_blog
165171
volumes:

0 commit comments

Comments
 (0)