Updates for Laravel 12
This commit is contained in:
parent
5406aa55bb
commit
5913e47360
0
.gitignore
vendored
Normal file → Executable file
0
.gitignore
vendored
Normal file → Executable file
2
Dockerfile.template
Normal file → Executable file
2
Dockerfile.template
Normal file → Executable file
@ -13,6 +13,8 @@ RUN apt-get update && apt-get install -y \
|
||||
libxml2-dev \
|
||||
zip \
|
||||
unzip \
|
||||
nodejs \
|
||||
npm \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install PHP extensions required by Laravel
|
||||
|
||||
43
README.md
Normal file → Executable file
43
README.md
Normal file → Executable file
@ -17,10 +17,42 @@
|
||||
|
||||
---
|
||||
|
||||
### **Test Example**
|
||||
### **Examples**
|
||||
|
||||
#### Website
|
||||
This is how you would set up a website that uses Laravel on example.com
|
||||
|
||||
```env
|
||||
# General Configurations
|
||||
PROJECT_NAME=example
|
||||
BASE_URL=com
|
||||
APP_SERVICE_NAME=app-{PROJECT_NAME}
|
||||
|
||||
# Network
|
||||
NETWORK_NAME={PROJECT_NAME}_network
|
||||
|
||||
# Nginx
|
||||
NGINX_SERVICE_NAME=nginx-{PROJECT_NAME}
|
||||
NGINX_PORT=80
|
||||
|
||||
# Database Configuration
|
||||
MYSQL_SERVICE_NAME=mysql-{PROJECT_NAME}
|
||||
MYSQL_DATABASE={PROJECT_NAME}_db
|
||||
MYSQL_USER={PROJECT_NAME}_user
|
||||
MYSQL_PASSWORD=my_password
|
||||
MYSQL_ROOT_PASSWORD=root_password
|
||||
MYSQL_PORT=3306
|
||||
|
||||
# Dockerfile Configurations
|
||||
PHP_VERSION=8.3-fpm
|
||||
PHP_EXTENSIONS=pdo_mysql mbstring exif pcntl bcmath gd
|
||||
|
||||
```
|
||||
|
||||
#### With Subdomain
|
||||
For this example we'll set up a laravel site at the subdomain testing.example.com
|
||||
|
||||
**Input**: `config/testing.env`:
|
||||
**Input**: `config/testing.example.com.env`:
|
||||
```env
|
||||
# General Configurations
|
||||
PROJECT_NAME=testing
|
||||
@ -47,13 +79,6 @@ PHP_VERSION=8.3-fpm
|
||||
PHP_EXTENSIONS=pdo_mysql mbstring exif pcntl bcmath gd
|
||||
```
|
||||
|
||||
If you want to use a url without a subdomain use the following instead, it will use testing.com
|
||||
```env
|
||||
# General Configurations
|
||||
PROJECT_NAME=testing
|
||||
BASE_URL=com
|
||||
```
|
||||
|
||||
**Command**:
|
||||
```bash
|
||||
./setup.sh config/testing.env
|
||||
|
||||
0
config/example.com.env
Normal file → Executable file
0
config/example.com.env
Normal file → Executable file
0
config/testing.example.com.env
Normal file → Executable file
0
config/testing.example.com.env
Normal file → Executable file
0
docker-compose.yml.template
Normal file → Executable file
0
docker-compose.yml.template
Normal file → Executable file
0
nginx.conf.template
Normal file → Executable file
0
nginx.conf.template
Normal file → Executable file
2
setup.sh
2
setup.sh
@ -91,4 +91,4 @@ docker exec -it "${APP_SERVICE_NAME}" bash -c "composer create-project --prefer-
|
||||
echo "Setting permissions for Laravel directories..."
|
||||
docker exec -it "${APP_SERVICE_NAME}" bash -c "chown -R www-data:www-data /var/www/html && chmod -R 775 /var/www/html"
|
||||
|
||||
echo "Laravel project setup complete. Access your application at http://<your-server>:${NGINX_PORT}"
|
||||
echo "Laravel project setup complete. Access your application at http://<your-server>:${NGINX_PORT}"
|
||||
Loading…
x
Reference in New Issue
Block a user