Skip to content

Commit

Permalink
fix: microseconds in utc_datetime gave ecto errors
Browse files Browse the repository at this point in the history
  • Loading branch information
xerbalind committed Nov 9, 2024
1 parent fcf47a0 commit 769afc1
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
- database

database:
image: timescale/timescaledb:latest-pg14
image: timescale/timescaledb:latest-pg17
restart: on-failure
environment:
POSTGRES_USER: zout
Expand Down
2 changes: 1 addition & 1 deletion lib/zout/data/data.ex
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions server.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 769afc1

Please sign in to comment.