Skip to content

实现打包部署到服务器 #3

@yaogengzhu

Description

@yaogengzhu

将go 项目打包成可执行的二进制文件

 CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build

在云端拉取二进制文件

./ginchat

可能会找不到配置文件,需要设置下路径信息

 CONFIG_PATH=/root/serve/ginchat/config ./ginchat&

& 表示可后台运行

查看当前运行的端口 如 8888

netstat -tuln | grep 8888

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions