Last active
February 5, 2025 12:43
-
-
Save swt30/7e4106a9a353cf82019cb92fc5ee93ee to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
services: | |
postgres: | |
build: | |
target: postgres | |
ports: | |
- "5432:5432" | |
environment: | |
POSTGRES_PASSWORD: password | |
clickhouse: | |
build: | |
target: clickhouse | |
develop: | |
watch: | |
- path: ./Dockerfile | |
action: rebuild | |
ports: | |
- "9000:9000" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM postgres:17.2 AS postgres | |
RUN echo "create table test as (select '2025-01-02 03:04:05.678900'::timestamptz as ts, '2025-01-02'::date as d);" > /docker-entrypoint-initdb.d/table.sql | |
FROM clickhouse/clickhouse-server:25.1.3.23 AS clickhouse | |
# FROM clickhouse/clickhouse-server:24.12 AS clickhouse | |
RUN echo "create table test (ts DateTime64(6, 'UTC'), d Date) engine = PostgreSQL('postgres:5432', 'postgres', 'test', 'postgres', 'password')" > /docker-entrypoint-initdb.d/postgres.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
up: | |
docker compose up --watch | |
bug: | |
docker compose exec clickhouse clickhouse-client -q "select ts from test where ts > '2025-01-01 00:00:00'::DateTime64" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment