Last active
January 22, 2024 18:40
-
-
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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