-
Clone the repository:
git clone git@github.com:rozimuhmmadweb/docker-spa.git
-
Navigate into the directory:
cd docker-spa -
Build Docker environment:
make build
-
Start the Docker containers:
make start
-
Install PHP:
make composer-install
-
Install Node.js:
make npm-install
-
Run frontend dev server:
make npm-serve
- Note: Run this command when you are actively developing the frontend. It is output a network address (e.g.,
Network: http://172.21.0.2:8080/). Open this address in your browser. - (Remember:
172.21.0.2might be the container's internal IP. You might need to access it viahttp://localhost:8080or similar, depending on port mapping.)
- Note: Run this command when you are actively developing the frontend. It is output a network address (e.g.,
-
Build the frontend for production:
make npm-build
- This compiles the frontend assets into the
/distfolder, ready for deployment(production).
- This compiles the frontend assets into the
-
PHP container shell:
make php-sh
-
Frontend container shell:
make frontend-ssh