Commit 9335e6f5 authored by Jake Jarvis's avatar Jake Jarvis 🐼

clean up and expose 3306

parent 17cf8a59
.gitignore .gitignore
CHANGELOG.md CHANGELOG.md
circle.yml LICENSE.md
docker-compose.test.yml README.md
docs/
tests/
LICENSE
README.md
\ No newline at end of file
.idea
tests/actual
\ No newline at end of file
...@@ -25,9 +25,29 @@ RUN add-apt-repository -y ppa:ondrej/php && \ ...@@ -25,9 +25,29 @@ RUN add-apt-repository -y ppa:ondrej/php && \
add-apt-repository -y ppa:ondrej/php5-compat && \ add-apt-repository -y ppa:ondrej/php5-compat && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \ apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C && \
apt-get update && \ apt-get update && \
apt-get -y dist-upgrade && \ apt-get -y upgrade && \
apt-get -y install supervisor wget curl git zip unzip pwgen apache2 mysql-server-5.7 php5.6 libapache2-mod-php5.6 php5.6-mysql php5.6-mcrypt php5.6-gd php5.6-xml php5.6-mbstring php5.6-gettext php5.6-zip php5.6-curl && \ apt-get -y --no-install-recommends install \
apt-get -y autoremove supervisor \
wget \
curl \
git \
zip \
unzip \
pwgen \
apache2 \
mysql-server-5.7 \
php5.6 \
libapache2-mod-php5.6 \
php5.6-mysql \
php5.6-mcrypt \
php5.6-gd \
php5.6-xml \
php5.6-mbstring \
php5.6-gettext \
php5.6-zip \
php5.6-curl && \
apt-get -y autoremove && \
rm -rf /var/lib/apt/lists/*
# Point CLI to use PHP 5.6 # Point CLI to use PHP 5.6
RUN ln -sfn /usr/bin/php5.6 /etc/alternatives/php RUN ln -sfn /usr/bin/php5.6 /etc/alternatives/php
...@@ -39,7 +59,7 @@ ADD config/create_mysql_users.sh /create_mysql_users.sh ...@@ -39,7 +59,7 @@ ADD config/create_mysql_users.sh /create_mysql_users.sh
ADD config/run.sh /run.sh ADD config/run.sh /run.sh
RUN chmod 755 /*.sh RUN chmod 755 /*.sh
# Add better default configurations # Add sensible default configurations
ADD config/supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf ADD config/supervisord-apache2.conf /etc/supervisor/conf.d/supervisord-apache2.conf
ADD config/supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf ADD config/supervisord-mysqld.conf /etc/supervisor/conf.d/supervisord-mysqld.conf
ADD config/mysqld_innodb.cnf /etc/mysql/conf.d/mysqld_innodb.cnf ADD config/mysqld_innodb.cnf /etc/mysql/conf.d/mysqld_innodb.cnf
...@@ -69,9 +89,6 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && ...@@ -69,9 +89,6 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" &&
php -r "unlink('composer-setup.php');" && \ php -r "unlink('composer-setup.php');" && \
mv composer.phar /usr/local/bin/composer mv composer.phar /usr/local/bin/composer
# Set "secure" MySQL admin password
ENV MYSQL_PASS:-$(pwgen -s 12 1)
# Enable mod_rewrite # Enable mod_rewrite
RUN a2enmod rewrite RUN a2enmod rewrite
......
...@@ -5,26 +5,19 @@ $db = new PDO('mysql:host=localhost', 'root', null); ...@@ -5,26 +5,19 @@ $db = new PDO('mysql:host=localhost', 'root', null);
<html lang=en> <html lang=en>
<head> <head>
<meta charset=utf-8> <meta charset=utf-8>
<title>Hello World from Docker-LAMP</title> <title>Hello World from PHP 5 on Docker</title>
<style> <style>
@import 'https://fonts.googleapis.com/css?family=Montserrat|Raleway|Source+Code+Pro'; body { font-family: sans-serif; }
body { font-family: 'Raleway', sans-serif; }
h2 { font-family: 'Montserrat', sans-serif; }
pre { pre {
font-family: 'Source Code Pro', monospace; font-family: monospace;
padding: 16px; padding: 16px;
overflow: auto; overflow: auto;
font-size: 85%; font-size: 85%;
line-height: 1.45; line-height: 1.45;
background-color: #f7f7f7; background-color: #f7f7f7;
border-radius: 3px; border-radius: 3px;
word-wrap: normal; word-wrap: normal;
} }
.container { .container {
max-width: 1024px; max-width: 1024px;
width: 100%; width: 100%;
...@@ -36,11 +29,10 @@ $db = new PDO('mysql:host=localhost', 'root', null); ...@@ -36,11 +29,10 @@ $db = new PDO('mysql:host=localhost', 'root', null);
<div class="container"> <div class="container">
<header> <header>
<img src="https://cdn.rawgit.com/mattrayner/docker-lamp/831976c022782e592b7e2758464b2a9efe3da042/docs/logo.svg" alt="Docker LAMP logo" /> <img src="https://cdn.rawgit.com/mattrayner/docker-lamp/831976c022782e592b7e2758464b2a9efe3da042/docs/logo.svg" alt="Docker LAMP logo" />
<h2>Welcome to <a href="https://github.com/mattrayner/docker-lamp" target="_blank">Docker-Lamp</a> a.k.a mattrayner/lamp</h2>
</header> </header>
<article> <article>
<p> <p>
For documentation, <a href="https://github.com/mattrayner/docker-lamp" target="_blank">click here</a>. Hello World! Documentation can be <a href="https://github.com/jakejarvis/docker-lamp-php5" target="_blank">found on GitHub</a>.
</p> </p>
</article> </article>
<section> <section>
......
...@@ -2,39 +2,23 @@ ...@@ -2,39 +2,23 @@
ServerAdmin webmaster@localhost ServerAdmin webmaster@localhost
DocumentRoot /var/www/html DocumentRoot /var/www/html
<Directory />
Options Indexes FollowSymLinks MultiViews
# To make wordpress .htaccess work
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/html> <Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews Options Indexes FollowSymLinks MultiViews
# To make wordpress .htaccess work
AllowOverride All AllowOverride All
Order allow,deny Order allow,deny
allow from all Allow from all
</Directory> </Directory>
Alias /phpmyadmin /var/www/phpmyadmin Alias /phpmyadmin /var/www/phpmyadmin
<Directory /phpmyadmin>
Options Indexes FollowSymLinks MultiViews
# To make wordpress .htaccess work
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory /var/www/phpmyadmin> <Directory /var/www/phpmyadmin>
Options Indexes FollowSymLinks MultiViews Options Indexes FollowSymLinks MultiViews
# To make wordpress .htaccess work
AllowOverride All AllowOverride All
Order allow,deny Order allow,deny
allow from all Allow from all
</Directory> </Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin"> <Directory /usr/lib/cgi-bin>
AllowOverride None AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny Order allow,deny
...@@ -49,9 +33,7 @@ ...@@ -49,9 +33,7 @@
CustomLog ${APACHE_LOG_DIR}/access.log combined CustomLog ${APACHE_LOG_DIR}/access.log combined
#
# Set HTTPS environment variable if we came in over secure # Set HTTPS environment variable if we came in over secure
# channel. # channel.
SetEnvIf x-forwarded-proto https HTTPS=on SetEnvIf x-forwarded-proto https HTTPS=on
</VirtualHost> </VirtualHost>
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
command=/start-apache2.sh command=/start-apache2.sh
numprocs=1 numprocs=1
autostart=true autostart=true
autorestart=true autorestart=true
\ No newline at end of file
...@@ -2,4 +2,4 @@ ...@@ -2,4 +2,4 @@
command=/start-mysqld.sh command=/start-mysqld.sh
numprocs=1 numprocs=1
autostart=true autostart=true
autorestart=true autorestart=true
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment