diff options
Diffstat (limited to '')
-rw-r--r-- | Dockerfile | 13 | ||||
-rw-r--r-- | postgresql/Dockerfile | 5 |
2 files changed, 17 insertions, 1 deletions
@@ -13,7 +13,18 @@ USER root COPY go.mod ./ RUN go mod download && go mod verify -COPY . . +# instead of doing COPY . . here, I want to be specific about the files I want to copy +# this way if I add a new file to the project, it will not be copied over + +# Can this be refactored? +COPY ./cmd ./cmd +COPY ./internal ./internal +COPY ./postgresql ./postgresql +COPY ./ui ./ui +COPY go.sum . +COPY go.mod . +COPY sonar-project.properties . + RUN chown -R app:app /app # Create a directory for the binary diff --git a/postgresql/Dockerfile b/postgresql/Dockerfile index efe7c5f..1196bce 100644 --- a/postgresql/Dockerfile +++ b/postgresql/Dockerfile @@ -1,2 +1,7 @@ FROM postgres:16-alpine + +RUN addgroup -S app && adduser -S -g app app + +USER app + COPY postgresql/populate.sql /docker-entrypoint-initdb.d/ |