diff --git a/.dockerignore b/.dockerignore index 0fd0e30..9794174 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,10 @@ -.git -data -.env -canon +# Send only what the build needs. Anything else in the project folder +# (data, backups, .env, files a deploy tool adds) stays out of the build, +# so it can't bloat the upload or change while it's being sent. +* +!go.mod +!go.sum +!cmd/ +!internal/ +!web/ +**/*_test.go diff --git a/Dockerfile b/Dockerfile index 3f86b75..ec5b0d0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ - FROM golang:1-alpine AS build WORKDIR /src COPY go.mod go.sum ./