From 769afc1c9c455a8f0edca4132b100bfb751592fd Mon Sep 17 00:00:00 2001 From: Xander Bil Date: Sat, 9 Nov 2024 21:19:33 +0100 Subject: [PATCH] fix: microseconds in utc_datetime gave ecto errors --- docker-compose.yml | 2 +- lib/zout/data/data.ex | 2 +- server.dockerfile | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 4e91556..3cdb087 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -16,7 +16,7 @@ services: - database database: - image: timescale/timescaledb:latest-pg14 + image: timescale/timescaledb:latest-pg17 restart: on-failure environment: POSTGRES_USER: zout diff --git a/lib/zout/data/data.ex b/lib/zout/data/data.ex index ba2a1e5..a80fcdb 100644 --- a/lib/zout/data/data.ex +++ b/lib/zout/data/data.ex @@ -165,7 +165,7 @@ defmodule Zout.Data do Logger.info("Starting new ping interval") # Prevent multiple pings with the same end point. - stop = now |> Timex.shift(seconds: 1) + stop = now |> Timex.shift(seconds: 1) |> DateTime.truncate(:second) Repo.insert!(%Ping{ start: now, diff --git a/server.dockerfile b/server.dockerfile index 8cf66b3..673e096 100644 --- a/server.dockerfile +++ b/server.dockerfile @@ -49,10 +49,10 @@ COPY rel rel RUN mix release # app stage -FROM alpine:3.17 AS app +FROM alpine:3.20 AS app # install runtime dependencies -RUN apk add --no-cache libstdc++ openssl ncurses-libs musl-locales openssl1.1-compat +RUN apk add --no-cache libstdc++ openssl ncurses-libs musl-locales WORKDIR "/app" RUN chown nobody /app