feat(template): Refactor template standard variable and implement dockerfile
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Matthieu 'JP' DERASSE
2022-09-29 20:04:37 +00:00
parent edbd97705a
commit ac7df8be2d
16 changed files with 191 additions and 98 deletions

View 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" ]

View File

@ -1,3 +1,3 @@
# {{ .ProjectName }}
# {{ .Config.ProjectName }}
{{ .ProjectDescription }}
{{ .Config.ProjectDescription }}

View File

@ -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: "/"