Girish Ramakrishnan 10 år sedan
förälder
incheckning
15e0ba81af
3 ändrade filer med 2 tillägg och 23 borttagningar
  1. 2 8
      Dockerfile
  2. 0 2
      scripts/prestart_app.sh
  3. 0 13
      scripts/setup_app.sh

+ 2 - 8
Dockerfile

@@ -1,4 +1,4 @@
-FROM girish/base:0.3
+FROM girish/base:0.5
 MAINTAINER Girish Ramakrishnan <girish@forwardbias.in>
 
 ENV DEBIAN_FRONTEND noninteractive
@@ -9,13 +9,7 @@ RUN mkdir -p /app/code && cd /app/code \
     && rm latest.tar.gz \
     && chown -R www-data.www-data /app/code
 
-RUN ln -s /etc/apache2/sites-available/php_app.conf /etc/apache2/sites-enabled/php_app.conf
-
-RUN cp /app/configs/supervisor/apache2.conf /etc/supervisor/conf.d/apache2.conf
-RUN cp /app/configs/supervisor/mysql.conf /etc/supervisor/conf.d/mysql.conf
-
 ADD scripts/ /app/scripts/
-RUN chmod +x /app/scripts/*
 
 ADD wp-config.php /app/configs/wp-config.php
 
@@ -24,4 +18,4 @@ RUN ln -s /app/data/wp-config.php /app/code/wp-config.php
 
 EXPOSE 80
 
-CMD [ "/app/scripts/start_supervisor.sh" ]
+CMD [ "/app/scripts/start.sh", "--lamp" ]

+ 0 - 2
scripts/prestart_app.sh

@@ -1,2 +0,0 @@
-#!/bin/sh
-

+ 0 - 13
scripts/setup_app.sh

@@ -1,21 +1,8 @@
 #!/bin/sh
 
-# start mysql
-echo "Creating database"
-mysqld_safe --datadir=/app/data/mysql > /dev/null 2>&1 &
-
-# wait for started
-while [ ! -S /var/run/mysqld/mysqld.sock ]
-do
-    sleep 2
-done
-
 # create the database
 mysql -uroot -ppassword -e "CREATE DATABASE wordpress;"
 
-# Shutdown MySQL
-mysqladmin -uroot -ppassword shutdown
-
 cp /app/configs/wp-config.php /app/data/wp-config.php
 mv /app/code/wp-content /app/data/wp-content/
 ln -s /app/data/wp-content /app/code/wp-content