diff options
author | Yuchen Pei <hi@ypei.me> | 2021-09-06 10:27:36 +1000 |
---|---|---|
committer | Yuchen Pei <hi@ypei.me> | 2021-09-06 10:46:46 +1000 |
commit | e5d8adfe0cda67173cae706708e0b4e7a67f5713 (patch) | |
tree | b3a834e0598d0136ce97eb2733d7987c2b97739e /docker/readme-lamp.sh | |
parent | 6995bcca056862e52d1167d6ee7e67d73a2bdd95 (diff) |
Adding lamp-php7 docker command.
- Tested locally. The website up and running.
- Also updated the readme script to run either php5 or php7.
Diffstat (limited to 'docker/readme-lamp.sh')
-rwxr-xr-x | docker/readme-lamp.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/docker/readme-lamp.sh b/docker/readme-lamp.sh new file mode 100755 index 0000000..c73cbfa --- /dev/null +++ b/docker/readme-lamp.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Spin up a docker lamp image. +# +# Usage: +# ./readme-lamp.sh [php-version] +# +# php-version: 5 or 7 (default) +# +# INSTRUCTIONS for testing with docker-lamp-php{5,7}: +# +# After the docker container spins up, +# the mysql password will be displayed. +# - MySQL on port 3306 +# - Apache on port 80 +# +# Don't forget to create the database: +# mysql -uadmin -pXXX -h127.0.0.1 -e "create database hnode;" +# and populate the schema/initial data with: +# mysql -uadmin -pXXX -h127.0.0.1 hnode < ../h-source/tables.sql + +if [ -z "$1"]; then + docker-compose up --build lamp-php7 +else + docker-compose up --build lamp-php"$1" +fi |