Skip to content

Commit 3e8ffd1

Browse files
committed
refactor: complete APP_FRAMEWORK to APP_WORKSPACE renaming across all configuration files
This comprehensive update ensures consistency by replacing all references to 'framework' with 'workspace' throughout the project configuration files. This terminology better reflects the versatile nature of the environment, which can support frameworks, libraries, applications, or any PHP project type. The change harmonizes the naming convention across the entire codebase.
1 parent f59e360 commit 3e8ffd1

File tree

8 files changed

+38
-14
lines changed

8 files changed

+38
-14
lines changed

.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ PHP_MEMORY_LIMIT=256M
3939
XDEBUG_ENABLED=1
4040

4141
# Application configuration
42-
APP_FRAMEWORK=default
42+
APP_WORKSPACE=default
4343
APP_PUBLIC_DIR=app/public
4444

45-
# Framework installation directories
45+
# Workspace installation directories
4646
SYMFONY_DIR=symfony-app
4747
LARAVEL_DIR=laravel-app

.env.dev

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ PHP_MEMORY_LIMIT=256M
3939
XDEBUG_ENABLED=1
4040

4141
# Application configuration
42-
APP_FRAMEWORK=default
42+
APP_WORKSPACE=default
4343
APP_PUBLIC_DIR=app/public
4444

45-
# Framework installation directories
45+
# Workspace installation directories
4646
SYMFONY_DIR=symfony-app
4747
LARAVEL_DIR=laravel-app

.env.prod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ XDEBUG_ENABLED=0
3737
PHPMYADMIN_PROFILE=none
3838

3939
# Application configuration
40-
APP_FRAMEWORK=default
40+
APP_WORKSPACE=default
4141
APP_PUBLIC_DIR=app/public
4242

43-
# Framework installation directories
43+
# Workspace installation directories
4444
SYMFONY_DIR=symfony-app
4545
LARAVEL_DIR=laravel-app

docker-compose.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ services:
3333
web:
3434
image: nginx:alpine
3535
volumes:
36-
- "./etc/nginx/framework:/etc/nginx/conf.d/framework"
36+
- "./etc/nginx/workspace:/etc/nginx/conf.d/workspace"
3737
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
3838
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
3939
- "./etc/ssl:/etc/ssl"
@@ -43,10 +43,10 @@ services:
4343
- "3000:443"
4444
environment:
4545
- NGINX_HOST=${NGINX_HOST}
46-
- APP_FRAMEWORK=${APP_FRAMEWORK:-default}
46+
- APP_WORKSPACE=${APP_WORKSPACE:-default}
4747
- APP_PUBLIC_DIR=${APP_PUBLIC_DIR:-public}
48-
- NGINX_FRAMEWORK_DIR=${NGINX_FRAMEWORK_DIR:-framework}
49-
command: /bin/sh -c "envsubst '$$NGINX_HOST $$APP_FRAMEWORK $$APP_PUBLIC_DIR $$NGINX_FRAMEWORK_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
48+
- NGINX_WORKSPACE_DIR=${NGINX_WORKSPACE_DIR:-workspace}
49+
command: /bin/sh -c "envsubst '$$NGINX_HOST $$APP_WORKSPACE $$APP_PUBLIC_DIR $$NGINX_WORKSPACE_DIR' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
5050
restart: always
5151
depends_on:
5252
- php

etc/nginx/default.template.conf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ server {
1414
root /var/www/html/${APP_PUBLIC_DIR};
1515
index index.php index.html;
1616

17-
# Framework specific configuration
18-
include /etc/nginx/conf.d/framework/${APP_FRAMEWORK}.conf;
17+
# Workspace specific configuration
18+
include /etc/nginx/conf.d/workspace/${APP_WORKSPACE}.conf;
1919

2020
# PHP-FPM Configuration
2121
location ~ \.php$ {
@@ -74,8 +74,8 @@ server {
7474
# access_log /var/log/nginx/access.log;
7575
# error_log /var/log/nginx/error.log;
7676
#
77-
# # Framework specific configuration
78-
# include /etc/nginx/conf.d/framework/${APP_FRAMEWORK}.conf;
77+
# # Workspace specific configuration
78+
# include /etc/nginx/conf.d/workspace/${APP_WORKSPACE}.conf;
7979
#
8080
# # PHP-FPM Configuration
8181
# location ~ \.php$ {

etc/nginx/workspace/default.conf

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Default framework configuration
2+
# Handles standard PHP applications
3+
4+
# Standard configuration - direct file access
5+
location / {
6+
try_files $uri $uri/ =404;
7+
}
8+
9+
# Router-based configuration - uncomment to enable
10+
# With this configuration, all requests will be directed to index.php
11+
# if the requested file doesn't exist
12+
# location / {
13+
# try_files $uri $uri/ /index.php$is_args$args;
14+
# }

etc/nginx/workspace/laravel.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Laravel framework configuration
2+
3+
location / {
4+
try_files $uri $uri/ /index.php?$query_string;
5+
}

etc/nginx/workspace/symfony.conf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Symfony framework configuration
2+
3+
location / {
4+
try_files $uri /index.php$is_args$args;
5+
}

0 commit comments

Comments
 (0)