feat(template): Refactor template standard variable and implement dockerfile
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
25
templates/go-swagger/Dockerfile.tmpl
Normal file
25
templates/go-swagger/Dockerfile.tmpl
Normal file
@ -0,0 +1,25 @@
|
||||
# Code generated by gouick; DO NOT EDIT.
|
||||
FROM alpine
|
||||
|
||||
LABEL maintainer="{{.Config.ProjectContact.Name}} <{{.Config.ProjectContact.Email}}>"
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
|
||||
USER nobody
|
||||
|
||||
COPY launcher.sh \
|
||||
{{- range .APIs }}
|
||||
{{.Binary}} \
|
||||
{{- end }}
|
||||
{{- range .Crons }}
|
||||
{{.Binary}} \
|
||||
{{- end }}
|
||||
{{- range .Workers }}
|
||||
{{.Binary}} \
|
||||
{{- end }}
|
||||
/app/
|
||||
|
||||
# expose port 8080
|
||||
EXPOSE 8080
|
||||
|
||||
CMD [ "/app/launcher.sh" ]
|
@ -1,3 +1,3 @@
|
||||
# {{ .ProjectName }}
|
||||
# {{ .Config.ProjectName }}
|
||||
|
||||
{{ .ProjectDescription }}
|
||||
{{ .Config.ProjectDescription }}
|
||||
|
@ -2,16 +2,16 @@
|
||||
swagger: "2.0"
|
||||
info:
|
||||
version: "1.0"
|
||||
title: "{{ .ProjectName }}"
|
||||
description: "{{ .ProjectDescription }}"
|
||||
title: "{{ .Config.ProjectName }}"
|
||||
description: "{{ .Config.ProjectDescription }}"
|
||||
contact:
|
||||
name: "{{ .ProjectContact.Name }}"
|
||||
email: "{{ .ProjectContact.Email }}"
|
||||
{{if .ProjectContact.URL }}
|
||||
url: "{{ .ProjectContact.URL }}"
|
||||
{{end}}
|
||||
name: "{{ .Config.ProjectContact.Name }}"
|
||||
email: "{{ .Config.ProjectContact.Email }}"
|
||||
{{- if .Config.ProjectContact.URL }}
|
||||
url: "{{ .Config.ProjectContact.URL }}"
|
||||
{{- end }}
|
||||
consumes:
|
||||
- "application/json"
|
||||
produces:
|
||||
- "application/json"
|
||||
basePath: "/"
|
||||
basePath: "/"
|
||||
|
Reference in New Issue
Block a user