Store config in config instead of root directory

This commit is contained in:
TwinProduction 2019-12-28 12:55:00 -05:00
parent c4f7370397
commit 50cdc159db
3 changed files with 4 additions and 4 deletions

View File

@ -8,7 +8,7 @@ RUN apk --update add ca-certificates
# Run the binary on an empty container
FROM scratch
COPY --from=builder /app/gatus .
COPY --from=builder /app/config.yaml .
COPY --from=builder /app/config.yaml ./config/config.yaml
COPY --from=builder /app/static static/
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
ENV PORT=8080

View File

@ -44,10 +44,10 @@ func Load(configFile string) error {
}
func LoadDefaultConfiguration() error {
err := Load("config.yaml")
err := Load("config/config.yaml")
if err != nil {
if err == ErrConfigFileNotFound {
return Load("config.yml")
return Load("config/config.yml")
}
return err
}

View File

@ -1,2 +1,2 @@
FROM twinproduction/gatus
ADD config.yaml ./
ADD config.yaml ./config/config.yaml