File tree Expand file tree Collapse file tree 7 files changed +58
-5
lines changed
Expand file tree Collapse file tree 7 files changed +58
-5
lines changed Original file line number Diff line number Diff line change 2828 - name : Set up Go
2929 uses : actions/setup-go@v3
3030 with :
31- go-version : " 1.17 "
31+ go-version-file : " go.mod "
3232 cache : true
3333
3434 - name : Run GoReleaser
Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ __debug_bin
44main
55app
66/.env.local
7+ temp
8+ dist
Original file line number Diff line number Diff line change @@ -34,10 +34,34 @@ changelog:
3434 - " ^test:"
3535 - " ^[Mm]erge"
3636dockers :
37- - goos : linux
37+ # Production image without shell
38+ - id : production
39+ goos : linux
3840 goarch : amd64
39-
41+ dockerfile : docker/Dockerfile.production
4042 image_templates :
4143 - " ghcr.io/{{ tolower .Env.REPO_NAME }}:latest"
4244 - " ghcr.io/{{ tolower .Env.REPO_NAME }}:{{ .Version }}"
43- - " ghcr.io/{{ tolower .Env.REPO_NAME }}:{{ .Major }}"
45+
46+ # Debug image which we can ssh into
47+ - id : debug
48+ goos : linux
49+ goarch : amd64
50+ dockerfile : docker/Dockerfile.debug
51+ image_templates :
52+ - " ghcr.io/{{ tolower .Env.REPO_NAME }}:debug"
53+ - " ghcr.io/{{ tolower .Env.REPO_NAME }}:{{ .Version }}-debug"
54+
55+ # Image to run migrations from
56+ - id : migrate
57+ goos : linux
58+ goarch : amd64
59+ dockerfile : docker/Dockerfile.migrate
60+ image_templates :
61+ - " ghcr.io/{{ tolower .Env.REPO_NAME }}:migrate"
62+ - " ghcr.io/{{ tolower .Env.REPO_NAME }}:{{ .Version }}-migrate"
63+ extra_files :
64+ # migrations folder from github
65+ - " migrations"
66+ # Custom migrate script
67+ - " docker/3eye-migrate.sh"
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ /migrate -path /migrations -database " $DATABASE_URL " " $@ " up
Original file line number Diff line number Diff line change 1+ FROM debian:11-slim
2+
3+ RUN apt-get update \
4+ && apt-get install -y curl ca-certificates \
5+ && update-ca-certificates
6+
7+ COPY 3eye /
8+
9+ ENTRYPOINT ["/3eye"]
Original file line number Diff line number Diff line change 1+ FROM debian:11-slim
2+
3+ ARG MIGRATE_VERSION=4.15.2
4+ ARG MIGRATE_PLATFORM=linux-amd64
5+
6+ RUN apt-get update \
7+ && apt-get install -y curl
8+
9+ RUN curl -L "https://github.com/golang-migrate/migrate/releases/download/v${MIGRATE_VERSION}/migrate.${MIGRATE_PLATFORM}.tar.gz" | tar -xvz --directory / migrate
10+
11+ COPY migrations /migrations
12+ COPY docker/3eye-migrate.sh /
13+
14+ ENTRYPOINT ["/3eye-migrate.sh"]
Original file line number Diff line number Diff line change 11FROM gcr.io/distroless/base-debian11
22
3- ENTRYPOINT ["/3eye" ]
43COPY 3eye /
4+
5+ ENTRYPOINT ["/3eye"]
You can’t perform that action at this time.
0 commit comments