Azure-App-Service / wordpress-alpine-php

14 stars 22 forks source link

Initial Dockerfile #1

Closed LeonZhang77 closed 6 years ago

LeonZhang77 commented 6 years ago

Tested, build successfully and can be RUN with ENV parameters.

The logical of entrypoint.sh:

If (DATABASE_TYPE = local)
    start mariadb, create azurelocaldb if not exist.
Endif
If (wordpress isn’t exist)
    Unzip wordpress.
    If (DATABASE_TYPE=local)
        Setup wp-config.php.
    Endif
Endif

These Env parameters can be set with “docker run -e” cmd:

DTABASE_TYPE 

phpmyadmin username and password:

 DATABASE_USERNAME
 DATABASE_PASSWORD

Wordpress paramters:

DATABASE_HOST
WORDPRESS_DATABASE_NAME
WORDPRESS_DATABASE_USERNAME
WORDPRESS_DATABASE_PASSWORD
WORDPRESS_TABLE_NAME_PREFIX