Skip to content

Commit b2420bc

Browse files
committed
Initial commit.
1 parent 1fd8b0a commit b2420bc

36 files changed

Lines changed: 2788 additions & 4991 deletions

.devcontainer/.env

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
POSTGRES_USER=postgres
2-
POSTGRES_PASSWORD=postgres
3-
POSTGRES_DB=postgres
4-
POSTGRES_HOST=postgres
5-
POSTGRES_PORT=5432
6-
POSTGRES_URL=postgresql://postgres:postgres@postgres:5432/postgres
7-
81
REDIS_URL=redis://redis:6379

.devcontainer/devcontainer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"name": "zenstack-live",
2+
"name": "zenstack-cache",
33
"dockerComposeFile": ["./docker-compose.yaml"],
44
"workspaceMount": "source=${localWorkspaceFolder},target=/workspace,type=bind",
55
"workspaceFolder": "/workspace",
66
"service": "workspace",
77
"shutdownAction": "stopCompose",
88
"postCreateCommand": "npm install -g bun@1.3.6 && bun install --frozen-lockfile",
99
"remoteUser": "node",
10-
"forwardPorts": [5432, 5540, 6379, 8080, 8083],
10+
"forwardPorts": [5432, 5540, 6379],
1111
"customizations": {
1212
"vscode": {
1313
"extensions": [

.devcontainer/docker-compose.yaml

Lines changed: 6 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
# 🟢 represents things you will likely need to add.
2-
# 🟠 represents things you will likely want to change.
3-
4-
name: zenstack-live
1+
name: zenstack-cache
52

63
volumes:
74
postgres-data:
@@ -13,72 +10,9 @@ networks:
1310
external: false
1411

1512
services:
16-
postgres:
17-
container_name: zenstack-live-postgres
18-
image: postgres:10.0
19-
volumes:
20-
- postgres-data:/var/lib/postgresql/data
21-
env_file: ./.env
22-
networks:
23-
- workspace
24-
25-
# 🟢
26-
command:
27-
- "postgres"
28-
- "-c"
29-
- "wal_level=logical"
30-
31-
ports:
32-
- 5432:5432
33-
healthcheck:
34-
test: [ "CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}" ]
35-
interval: 5s
36-
timeout: 5s
37-
retries: 5
38-
39-
debezium:
40-
container_name: zenstack-live-debezium
41-
image: debezium/server:3.0.0.Final
42-
depends_on:
43-
- postgres
44-
- redis
45-
environment:
46-
DATABASE_USER: default
47-
DEBEZIUM_FORMAT_SCHEMAS_ENABLE: false
48-
DEBEZIUM_SINK_REDIS_ADDRESS: redis:6379 # 🟠
49-
DEBEZIUM_SINK_REDIS_PASSWORD: # 🟠
50-
DEBEZIUM_SINK_REDIS_SSL_ENABLED: false
51-
DEBEZIUM_SINK_REDIS_WAIT_RETRY_ENABLED: true
52-
DEBEZIUM_SINK_TYPE: redis
53-
DEBEZIUM_SOURCE_CONNECTOR_CLASS: io.debezium.connector.postgresql.PostgresConnector
54-
DEBEZIUM_SOURCE_DATABASE_DBNAME: postgres # 🟠
55-
DEBEZIUM_SOURCE_DATABASE_HOSTNAME: postgres # 🟠
56-
DEBEZIUM_SOURCE_DATABASE_PASSWORD: postgres # 🟠
57-
DEBEZIUM_SOURCE_DATABASE_PORT: 5432 # 🟠
58-
DEBEZIUM_SOURCE_DATABASE_SERVER_NAME: zenstack
59-
DEBEZIUM_SOURCE_DATABASE_USER: postgres # 🟠
60-
DEBEZIUM_SOURCE_PLUGIN_NAME: pgoutput
61-
DEBEZIUM_SOURCE_SCHEMA_WHITELIST: public
62-
DEBEZIUM_SOURCE_SNAPSHOT_MODE: no_data
63-
DEBEZIUM_SOURCE_TOPIC_PREFIX: zenstack.table
64-
DEBEZIUM_SOURCE_SCHEMA_HISTORY_INTERNAL: io.debezium.storage.redis.history.RedisSchemaHistory
65-
DEBEZIUM_SOURCE_OFFSET_STORAGE: io.debezium.storage.redis.offset.RedisOffsetBackingStore
66-
DEBEZIUM_SOURCE_OFFSET_STORAGE_REDIS_KEY: zenstack.metadata.offsets
67-
SCHEMA_INCLUDE_LIST: public
68-
networks:
69-
- workspace
70-
ports:
71-
- 8080:8080
72-
- 8083:8083
73-
healthcheck:
74-
test: ["CMD", "curl", "-f", "http://localhost:8080/q/health"]
75-
interval: 5s
76-
timeout: 5s
77-
retries: 5
78-
7913
redis:
80-
container_name: zenstack-live-redis
81-
image: redis:5.0
14+
container_name: zenstack-cache-redis
15+
image: redis:3.0
8216
command: redis-server
8317
networks:
8418
- workspace
@@ -90,10 +24,9 @@ services:
9024
timeout: 5s
9125
retries: 5
9226

93-
# Below is dev stuff for the project, you don't need it.
9427
workspace:
95-
container_name: zenstack-live-workspace
96-
image: mcr.microsoft.com/devcontainers/javascript-node:22
28+
container_name: zenstack-cache-workspace
29+
image: mcr.microsoft.com/devcontainers/javascript-node:20
9730
volumes:
9831
- ..:/workspace:cached
9932
env_file: ./.env
@@ -102,7 +35,7 @@ services:
10235
- workspace
10336

10437
redis-insight:
105-
container_name: zenstack-live-redis-insight
38+
container_name: zenstack-cache-redis-insight
10639
image: redis/redisinsight:3.0
10740
depends_on:
10841
- redis

.oxlintrc.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"eslint/func-style": "off",
2626
"eslint/no-ternary": "off",
2727
"eslint/id-length": "off",
28+
"eslint/no-undefined": "off",
2829
"eslint/no-empty-function": "off",
2930
"eslint/no-continue": "off",
3031
"eslint/max-statements": "off",
@@ -37,6 +38,7 @@
3738
"react/jsx-filename-extension": ["error", { "extensions": [".jsx", ".tsx"] }],
3839
"react/jsx-props-no-spreading": "off",
3940
"@typescript-eslint/ban-ts-comment": "off",
41+
"@typescript-eslint/no-empty-interface": "off",
4042
"typescript/consistent-type-definitions": "off",
4143
"typescript/explicit-function-return-type": "off",
4244
"typescript/explicit-module-boundary-types": "off",
@@ -71,7 +73,7 @@
7173
"react/jsx-no-comment-textnodes": "warn",
7274
"react/jsx-no-duplicate-props": "warn",
7375
"react/jsx-no-target-blank": "warn",
74-
"react/jsx-no-undef": "warn",
76+
"react/jsx-no-undef": "error",
7577
"react/no-children-prop": "warn",
7678
"react/no-danger-with-children": "warn",
7779
"react/no-direct-mutation-state": "warn",

0 commit comments

Comments
 (0)