aboutsummaryrefslogtreecommitdiff
path: root/docker/readme-lamp.sh
blob: d5aa5723a04e28717d5e82d6fb4c2b80228f5a50 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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