- Docker
- Nodejs >19.0.0
- yarn
# install Nuxt dependencies
$ yarn install
# install PHP server dependencies
$ composer install
# UI serve with hot reload at localhost:3000
$ yarn dev
# PHP server at localhost:8081
# MySQL server at localhost:3306
# PHPAdmin server at localhost:8082
$ yarn dev-server
# install dependencies
$ yarn install # NUXT Front end
$ composer install # PHP Server
# generate static project with '/api' directory and '/composer.json' & '/composer.lock'
$ yarn generate
The /deploy.mjs
script automates the deployment process for a Node.js project, focusing on the following key tasks:
- Clones a specified branch (default: build) from the remote repository into a temporary folder.
- Cleans the temporary folder and copies the contents of the dist folder into it.
- Checks for uncommitted changes in the temporary folder.
- If changes exist, adds, commits, and pushes the changes to the specified branch (default: build) with a commit message containing the current date.
- Removes the temporary folder after deployment.
$ yarn publish-git
For detailed explanation on how things work, check out the documentation.
-
/api: This directory contains all PHP-related files.
-
/api/php.local.ini: This file is pasted as
php.ini
in the local server after deployment. You may need to create your ownphp.ini
file on the server if necessary. -
/api/config/: This folder contains PHP configuration environment-specific files, such as database connection secrets.
-
/api/apache-configs/: This folder contains Apache web server configurations for local development.
-
-
/docker-compose.yml: Manages server settings, including port configuration, PHP module installation, and MySQL database setup.
vue: "^2.7.10",
nuxt: "^2.15.8",
php: php:7.4-apache
mysql: mysql:8.0