Improve data location selection
This commit is contained in:
parent
1f9827505b
commit
519796d3d1
3 changed files with 24 additions and 9 deletions
14
Dockerfile
14
Dockerfile
|
@ -9,10 +9,9 @@ COPY src /app/src
|
|||
COPY go.mod /app/
|
||||
COPY .golangci.yml /app/
|
||||
|
||||
RUN go mod tidy
|
||||
RUN golangci-lint run
|
||||
RUN go test ./src/...
|
||||
|
||||
RUN go mod tidy; \
|
||||
golangci-lint run; \
|
||||
go test ./src/...
|
||||
RUN CGO_ENABLED=1 go build -o app src/main/main.go
|
||||
|
||||
FROM alpine:latest
|
||||
|
@ -21,6 +20,9 @@ WORKDIR /app
|
|||
|
||||
COPY --from=1 /app/app .
|
||||
COPY ./templates /app/templates
|
||||
RUN touch config.json database.db
|
||||
|
||||
CMD ["./app"]
|
||||
RUN mkdir data
|
||||
ENV DATABASE_PATH=./data/database.db
|
||||
ENV CONFIG_PATH=./data/config.json
|
||||
|
||||
CMD "./app"
|
Loading…
Add table
Add a link
Reference in a new issue