GithubHelp home page GithubHelp logo

dailyhub.service's Introduction

dailyhub.service

此项目为dailyhub应用的后台服务实现。

源代码部署应用

新建数据库

创建数据库dailyhub,并使用db文件夹下的data.sql创建数据库中的表。

运行服务器

db文件夹下的conf.example.yml更名为conf.yml,并进行相应的配置(数据库用户名和密码)。然后在项目根目录下运行:

$ go run main.go
[negroni] listening on :9090
......

docker部署服务

db文件夹下增加db_user_password.txtdb_root_password.txt,其中内容即为user和root的密码(密码为dailyhub)。

在项目根目录下执行:

$ docker-compose up -d

db文件夹下的data.sql文件拷贝到mysql容器中:

$ docker cp db/data.sql mysql:/mysql

之后,使用docker exec -it <mysql容器id> /bin/bash运行容器:

# 登录mysql
$ mysql -u dailyhub -p 
password: dailyhub

初始化数据库:

mysql> create database dailyhub;
mysql> source /mysql/data.sql

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.