Skip to content

Instantly share code, notes, and snippets.

@santarinto
Last active January 22, 2024 18:40
Show Gist options
  • Save santarinto/08bd15336ea45d1bd342107b0f439d6f to your computer and use it in GitHub Desktop.
Save santarinto/08bd15336ea45d1bd342107b0f439d6f to your computer and use it in GitHub Desktop.
Simple running script for start web app on php and mysql DB in docker
php --version
docker --version
# Checking if Docker is running
try {
docker info > $null 2>&1
Write-Host "Docker is running."
} catch {
Write-Error "Docker is not running. Please start Docker and try again."
exit 1
}
docker run -d -e MYSQL_ROOT_PASSWORD=toor -v "${PWD}/web-app/data:/var/lib/mysql" mariadb
php -S localhost:8000 -t web-app/public
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment