goreleaser config update
This commit is contained in:
parent
0a9f69342b
commit
29184164b1
|
@ -0,0 +1,9 @@
|
|||
FROM alpine:latest as builder
|
||||
RUN apk add -U tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && apk del tzdata
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /etc/localtime /etc/localtime
|
||||
COPY ohUrlShortener /app/ohurlshortener
|
||||
COPY docker/docker_config.ini /app/config.ini
|
||||
EXPOSE 9092
|
||||
ENTRYPOINT ["/app/ohurlshortener","-s","admin","-c","/app/config.ini"]
|
|
@ -0,0 +1,9 @@
|
|||
FROM alpine:latest as builder
|
||||
RUN apk add -U tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && apk del tzdata
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /etc/localtime /etc/localtime
|
||||
COPY ohUrlShortener /app/ohurlshortener
|
||||
COPY docker/docker_config.ini /app/config.ini
|
||||
EXPOSE 9091
|
||||
ENTRYPOINT ["/app/ohurlshortener","-s","portal","-c","/app/config.ini"]
|
|
@ -41,7 +41,7 @@ services:
|
|||
- POSTGRES_USER=${PG_SUPER_USER}
|
||||
- POSTGRES_PASSWORD=${PG_SUPER_PWD}
|
||||
- TZ=PRC
|
||||
- PGTZ=PRC
|
||||
- PGTZ=PRC
|
||||
volumes:
|
||||
- ../structure.sql:/docker-entrypoint-initdb.d/001.sql
|
||||
- ../docker/container-data/postgresql:/var/lib/postgresql/data
|
||||
|
|
|
@ -20,7 +20,42 @@ builds:
|
|||
- arm64
|
||||
ignore:
|
||||
- goos: windows
|
||||
goarch: arm64
|
||||
goarch: arm64
|
||||
|
||||
dockers:
|
||||
- use: buildx
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
dockerfile: "docker/goreleaser-admin.Dockerfile"
|
||||
image_templates:
|
||||
- "baratsemet/ohurlshortener-admin:{{ .Version }}"
|
||||
- "baratsemet/ohurlshortener-admin:latest"
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- "--label=cn.ohurls.image.created={{.Date}}"
|
||||
- "--label=cn.ohurls.image.title={{.ProjectName}}"
|
||||
- "--label=cn.ohurls.image.revision={{.FullCommit}}"
|
||||
- "--label=cn.ohurls.image.version={{.Version}}"
|
||||
skip_push: "true"
|
||||
extra_files:
|
||||
- docker/docker_config.ini
|
||||
|
||||
- use: buildx
|
||||
goos: linux
|
||||
goarch: amd64
|
||||
dockerfile: "docker/goreleaser-portal.Dockerfile"
|
||||
image_templates:
|
||||
- "baratsemet/ohurlshortener-portal:{{ .Version }}"
|
||||
- "baratsemet/ohurlshortener-portal:latest"
|
||||
build_flag_templates:
|
||||
- "--platform=linux/amd64"
|
||||
- "--label=cn.ohurls.image.created={{.Date}}"
|
||||
- "--label=cn.ohurls.image.title={{.ProjectName}}"
|
||||
- "--label=cn.ohurls.image.revision={{.FullCommit}}"
|
||||
- "--label=cn.ohurls.image.version={{.Version}}"
|
||||
skip_push: "true"
|
||||
extra_files:
|
||||
- docker/docker_config.ini
|
||||
|
||||
archives:
|
||||
- replacements:
|
||||
|
@ -42,7 +77,7 @@ checksum:
|
|||
name_template: 'checksums.txt'
|
||||
|
||||
snapshot:
|
||||
name_template: "1.7"
|
||||
name_template: "{{ .Version }}"
|
||||
|
||||
nfpms:
|
||||
- file_name_template: "{{.ProjectName}}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
|
||||
|
|
Loading…
Reference in New Issue