Skip to content

Commit

Permalink
switch to Dockerfile-goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
b3n4kh committed Jan 24, 2023
1 parent 1dad991 commit 4c8e093
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ archives:
- LICENSE
- README.md
- webui/public/*
- config.default.yml
- config.yml
- templates/*
- version.txt
replacements:
Expand All @@ -31,21 +31,13 @@ dockers:
- mailwhale-builds
goos: linux
goarch: amd64
dockerfile: Dockerfile-goreleaser
extra_files:
- "./go.mod"
- "./go.sum"
- "main.go"
- "version.txt"
- "config.yml"
- "LICENSE"
- "README.md"
- "assets/"
- "config/"
- "service/"
- "templates/"
- "types/"
- "util/"
- "web/"
- "webui/"

image_templates:
Expand Down
31 changes: 31 additions & 0 deletions Dockerfile-goreleaser
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Build Stage

FROM golang:1.19 AS api-build-env

WORKDIR /app

FROM node:18 AS ui-build-env

WORKDIR /src
ADD webui .
RUN yarn && \
yarn build

# Run Stage

# When running the application using `docker run`, you can pass environment variables
# to override config values using `-e` syntax.

FROM alpine
WORKDIR /app

COPY mailwhale README.md version.txt LICENSE config.yml templates/ ./
COPY --from=ui-build-env /src/public ./webui/public

ENV MW_ENV=prod
ENV MW_WEB_LISTEN_V4=0.0.0.0:3000
ENV MW_STORE_PATH=/data/data.json.db

VOLUME /data

ENTRYPOINT ./mailwhale

0 comments on commit 4c8e093

Please sign in to comment.