Skip to content

Instantly share code, notes, and snippets.

@vchrisb
Created May 15, 2016 08:19
Show Gist options
  • Select an option

  • Save vchrisb/d771bd61c68a9b90f50044ed066ca2d0 to your computer and use it in GitHub Desktop.

Select an option

Save vchrisb/d771bd61c68a9b90f50044ed066ca2d0 to your computer and use it in GitHub Desktop.

Revisions

  1. vchrisb created this gist May 15, 2016.
    17 changes: 17 additions & 0 deletions restart_wordpress.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/bin/bash

    #stopping container
    echo "Stopping Container: wordpress1_mariadb wordpress_html"
    sudo docker stop wordpress_mariadb wordpress_html

    #delete
    echo "Deleting Container: wordpress1_mariadb wordpress_html"
    sudo docker rm -f wordpress_mariadb wordpress_html

    # start mariadb container
    echo "Staring Container wordpress1_mariadb"
    sudo docker run -d --restart=always --name wordpress_mariadb --volumes-from wordpress_data -e MYSQL_ROOT_PASSWORD=password mariadb

    # start wordpress container
    echo "Staring Container wordpress_html"
    sudo docker run -d --restart=always --name wordpress_html --volumes-from wordpress_data --link wordpress_mariadb:mysql --expose 80 -e VIRTUAL_HOST=domain.net,sub.domain.net -e LETSENCRYPT_HOST=domain.net,sub.domain.net -e [email protected] wordpress