Giter VIP home page Giter VIP logo

dnmp's Introduction

dnmp

怀着忐忑的心情上传了我的第一个github项目 刚接触Docker没多久,这个练手的 希望大家多多指教

在此之前先要了解docker一些基本用法 我学习docker的记录:https://jlmvp.cn/

首先确保你安装了docker和docker-compose以及git

目前只加了php5.6 和php7.2两个版本切换,如需扩展请自行照猫画虎

开始

1、将项目clone到本地

2、进入dnmp将env-example 重命名为.env

3、配置env中你所需要设置的环境变量

4、在docker-compose.yml目录 执行docker-compose config 你可以看到完整配置信息

Image text

5、执行docker-compose up -d (额。。安装php的那些扩展挺慢的 你可以酌情 修改php目录下的Dockerfile,等用的到那些扩展的时候 再装)**

Image text

安装成功之后显示如下 Image text

6、修改nginx的配置文件 nginx/conf.d/default.conf

Image text

查看 容器php名称

`docker ps | grep php

7、重启nginx服务

8、在你的项目目录下创建index.php 输出phpinfo();

Image text

结尾提示 如果你使用了mysql8.0以上版本会报如下错误

connect error:The server requested authentication method unknown to the client

解决方法 进入mysql容器登录mysql

执行

ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY 'root';

flush privileges;

Gogs安装

执行docker-compose up -d

进入mysql容器创建Gogs数据库 CREATE DATABASE gogs CHARACTER SET utf8 COLLATE utf8_bin;

打开网页输入你的IP地址:你设置的Gogs端口号 进入安装安装向导页面

设置参数

Image text

Image text

Image text

RabbitMQ

rabbitmq page

dnmp's People

Contributors

michealjl 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.