update ci/cd config
build-and-push / test-backend (push) Blocked by required conditions
build-and-push / test-frontend-build (push) Blocked by required conditions
build-and-push / test-frontend-e2e (push) Blocked by required conditions
build-and-push / build-backend (push) Blocked by required conditions
build-and-push / build-frontend (push) Blocked by required conditions
build-and-push / build-timescaledb2 (push) Blocked by required conditions
build-and-push / build-rabbitmq3 (push) Blocked by required conditions
build-and-push / guard-master-only (push) Has started running

This commit is contained in:
2026-05-21 11:05:53 +08:00
parent 008fb370d5
commit ef7d3a5351
8 changed files with 2421 additions and 63 deletions
+14
View File
@@ -0,0 +1,14 @@
FROM docker.io/timescale/timescaledb:2.27.1-pg16
LABEL org.opencontainers.image.title="datahub-timescaledb2" \
org.opencontainers.image.vendor="WPIC" \
org.opencontainers.image.licenses="LicenseRef-WPIC-Proprietary" \
org.opencontainers.image.source="https://repo.yneed.cn/wpic-dev/datahub"
ARG TIMEZONE=Asia/Shanghai
ENV TZ=${TIMEZONE} \
LANG=en_US.utf8
COPY initdb/ /docker-entrypoint-initdb.d/
EXPOSE 5432
@@ -0,0 +1,19 @@
-- Triggered on first start only (when $PGDATA is empty).
-- Enables TimescaleDB extension in the datahub database.
--
-- Three-layer defense for extension activation:
-- 1. Upstream timescale image: /docker-entrypoint-initdb.d/000_install_timescaledb.sh
-- already runs CREATE EXTENSION in $POSTGRES_DB; this file is defensive backup.
-- 2. This script: explicit \connect datahub then CREATE EXTENSION.
-- 3. backend/migrations/2026_05_07_100000_enable_timescaledb_extension.php
-- runs CREATE EXTENSION IF NOT EXISTS on application boot.
--
-- All three layers are idempotent (IF NOT EXISTS), zero runtime cost.
\connect datahub
CREATE EXTENSION IF NOT EXISTS timescaledb;
-- Future extensions can be added here, e.g.:
-- CREATE EXTENSION IF NOT EXISTS pg_stat_statements;
-- CREATE EXTENSION IF NOT EXISTS pg_trgm;