Sign inSign up

r8112013/gfast-app

By r8112013

•Updated over 3 years ago

Image
0

1.5K

r8112013/gfast-app repository overview

⁠仓库地址

git clone -b os-v3.2 https://github.com/tiger1103/gfast.git

修改配置:

vim manifest/config/config.yaml
    link:   "mysql:gfast:gfast@tcp(10.147.19.36:3306)/gfast?charset=utf8mb4&parseTime=true&loc=Local"
  cacheModel: "memory"  # 缓存机制 redis 或 memory

导入数据库:

resource/data/gfast-v32.sql

dockerfile:

# 使用alpine作为基础镜像
FROM alpine
# 将时区设定为上海
RUN set -eux \
    && apk add --no-cache tzdata \
    && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
    && echo "Asia/Shanghai" > /etc/timezone \
    && apk del tzdata
ENV TZ=Asia/Shanghai
# 安装golang
RUN set -eux \
    && apk add --no-cache go \
    && rm -rf /var/cache/apk/*
# 设置工作目录
WORKDIR /gfast-app
# 将应用程序复制到容器中
COPY . .
#设定go环境变量
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
# 安装依赖、编译
RUN set -eux \
    && go mod download \
    && go build -o gfast-app ./main.go
# 暴露端口
EXPOSE 8808
# 设置容器启动时执行的命令
CMD ["./gfast-app"]

Tag summary

Content type

Image

Digest

sha256:71e707cdb…

Size

330.9 MB

Last updated

over 3 years ago

docker pull r8112013/gfast-app