Giter Site home page Giter Site logo

the-cc-dev / dockerpress Goto Github PK

View Code? Open in Web Editor NEW

This project forked from onefastsnail/dockerpress

0.0 2.0 0.0 20 KB

A Dockerrrrizzzed Wordpress application/environment which provides you with a simple PHP, MariaDB, NGINX stack all preconfigured to work out the box with a few simple steps.

Shell 4.19% JavaScript 57.82% PHP 32.78% Dockerfile 5.21%

dockerpress's Introduction

Dockerize the web

A Dockerrrrizzzed Wordpress application. This framework provides you with a simple PHP, MariaDB, NGINX stack all preconfigured to work out the box with a few simple steps.

This build has a src/ dist/ nature where we use Gulp to combine dependencies managed with Composer and our /app/src code to create a clean disposable /dist folder.

For development ensure gulp is running within /app when editing files so they are copied over, and if you need add more files to the watch do so within /app/gulpfile.js. I would recommend to add new folders to the custom paths object to ensure the streams remain small and fast.

New project

  1. Stop any existing docker projects and containers
  2. Copy and configure /app/env/.env.example to /app/env/.env (ensure all passwords are strong and filled in)
  3. place your theme in /app/src/wp-content/themes (you may need to amend the gulp file upon your asset structure)
  4. cd into /app and run ./build.sh to run some a simple build script, install dependencies via composer and build with gulp
  5. Visit http://localhost or http://yourdomain.io
  6. And Enjoy :)

Build the project

  1. Stop any existing docker projects and containers
  2. run docker-compose up -d --build to bring up the docker stack
  3. to develop cd into /app and run docker run -it --rm -v $(pwd):/app onefastsnail/node-bower-gulp sh -c gulp

Nginx

Bundled with some basic nginx security for Wordpress. HTTP auth credentials are demo : demo

Database

There is a phpMyAdmin container running to give you a database management tool. This can be accessed from http://yourdomain.com:8080

The database is stored in /data/mariadb

Node related commands

To run any Node related commands, run these commands inside the /app folder.

docker run -it --rm -v $(pwd):/app onefastsnail/node-bower-gulp CMD

  • docker run -it --rm -v $(pwd):/app onefastsnail/node-bower-gulp bower search bootstrap --allow-root
  • docker run -it --rm -v $(pwd):/app onefastsnail/node-bower-gulp npm install
  • docker run -it --rm -v $(pwd):/app onefastsnail/node-bower-gulp sh -c gulp
  • docker run -it --rm -v $(pwd):/app onefastsnail/node-bower-gulp npm run build

Composer

To run these Composer related commands, run inside the /app folder

docker run -it --rm -v $(pwd):/app composer/composer CMD

  • docker run -it --rm -v $(pwd):/app composer/composer install --no-dev
  • docker run -it --rm -v $(pwd):/app composer/composer update --no-dev

WP CLI

To run WPCLI related commands, run these commands inside the /app folder.

docker run --rm -it -v $(pwd):/app --link mysql:mysql onefastsnail/wpcli CMD

  • docker run --rm -it -v $(pwd):/app --link mysql:mysql onefastsnail/wpcli wp --allow-root user list
  • docker run --rm -it -v $(pwd):/app --link mysql:mysql onefastsnail/wpcli wp search-replace 'http://old.domain' 'http://new.domain' --allow-root

Security

To run some WP Scan security tests, you can use this:

  • docker run --rm wpscanteam/wpscan -u http://yourdomain.io --enumerate u --basic-auth demo:demo

Notes

Credits

Paul Stewart

License

And Enjoy :)

dockerpress's People

Contributors

onefastsnail avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.