This is a simple PHP, MySQL, Apache web application that has been dockerized into one container by using Docker Compose.
Install Docker Desktop on your computer.
Clone this git repository into a folder.
To run this code, run the command: docker-compose up
from the terminal shell within the directory of this project after cloning it.
Open localhost/ on your browser to view the web-app on your machine.
Install Tailwind CSS dependency (Need Node.js installed):
npm install
Build Tailwind CSS:
Development watch mode:
npm run dev
One-time build:
npm run build
Do use the tailwind.config.js
file to configure your project's Tailwind CSS settings, and make sure it is able to scan your project's files to generate the corresponding CSS.
If you're doing development, do use incognito mode in your browser to avoid any caching issues. Simply refresh the page to see the changes, or close and reopen the window in incognito mode.
docker-compose down
docker-compose build
docker-compose up -d
Install ngrok via Docker with the following command:
docker pull ngrok/ngrok
Sign up or log in to ngrok.com and get your auth token.
Put your app online at an ephemeral domain forwarding to your upstream service. Start the project container and also run the ngrok container by:
docker run --net=host -it -e NGROK_AUTHTOKEN=<YOUR_NGROK_AUTH_TOKEN> ngrok/ngrok:latest http 80
Once done, you will get an ephemeral domain link to see your app in the terminal.