Git Product home page Git Product logo

wordpress_blog's Introduction

wordpress_blog

docker-compose 创建个人博客

目录结构:

wordpress_blog
    docker-compose.yml

docker-compose.yml中

version: '3.3'

services:
   db:
     image: mysql:5.7
     volumes:
       - db_data:/var/lib/mysql
     restart: always
     environment:
       MYSQL_ROOT_PASSWORD: somewordpress
       MYSQL_DATABASE: wordpress
       MYSQL_USER: wordpress
       MYSQL_PASSWORD: wordpress

  wordpress:
    depends_on:
      - db
    image: wordpress:latest
    ports:
      - "8000:80"
    restart: always
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
volumes:
    db_data: {}

创建过程

  • 安装docker,自行百度安装,本处不在赘述
  • 创建wordpress_blog过程

运行命令

  • 等待docker-compose运行,最终会下载mysql镜像和wordpress镜像,并部署服务

最终结果

  • 使用docker ps查看运行进程,会发现开启了两个进程

  • 去浏览器访问,注意ip和port

   网络访问   

   后台端   

  • 到了这一步,可以修改设置,发表博客,可以更改dashbord,仪表盘,设置主题,更改语言为简体中文,更改时区。后台创建你的博客,前台访问博客内容。

  • 在后台中设置你的博客和写博客,

  • 前台中查看发表的博客:通过访问http://192.168.99.100:8000/

博客展示

  • 此处为本人已经设置ok和写好的一篇博客。

  • 至此,就随意在你的wordpress博客中畅游吧,欢迎点赞和关注

  

wordpress_blog's People

Contributors

wzl1368611 avatar

Stargazers

 avatar

Watchers

 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.