initial commit
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
[Volume]
|
||||
VolumeName=cdc-debezium-data
|
||||
@@ -0,0 +1,19 @@
|
||||
[Unit]
|
||||
Description=CDC demo Debezium Server
|
||||
Requires=cdc-postgres.service cdc-nats.service
|
||||
After=cdc-postgres.service cdc-nats.service
|
||||
|
||||
[Container]
|
||||
Image=quay.io/debezium/server:3.5.2.Final
|
||||
ContainerName=cdc-debezium
|
||||
Network=cdc.network
|
||||
Volume=%h/.local/share/live-inventory-cdc-demo/application.properties:/debezium/config/application.properties:ro,Z
|
||||
Volume=cdc-debezium-data.volume:/debezium/data
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
TimeoutStartSec=180
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=CDC demo inspect NATS JetStream
|
||||
Requires=cdc-nats.service
|
||||
After=cdc-nats.service
|
||||
|
||||
[Container]
|
||||
Image=docker.io/natsio/nats-box:latest
|
||||
Network=cdc.network
|
||||
Environment=NATS_URL=nats://cdc-nats:4222
|
||||
Volume=%h/.local/share/live-inventory-cdc-demo/scripts:/scripts:ro,Z
|
||||
Exec=sh /scripts/inspect.sh
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
TimeoutStartSec=120
|
||||
@@ -0,0 +1,2 @@
|
||||
[Volume]
|
||||
VolumeName=cdc-nats-data
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=CDC demo NATS JetStream
|
||||
|
||||
[Container]
|
||||
Image=docker.io/library/nats:2
|
||||
ContainerName=cdc-nats
|
||||
Network=cdc.network
|
||||
PublishPort=4222:4222
|
||||
PublishPort=8222:8222
|
||||
Volume=cdc-nats-data.volume:/data
|
||||
Exec=--debug --http_port=8222 --js --store_dir=/data
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,2 @@
|
||||
[Volume]
|
||||
VolumeName=cdc-postgres-data
|
||||
@@ -0,0 +1,26 @@
|
||||
[Unit]
|
||||
Description=CDC demo Postgres
|
||||
|
||||
[Container]
|
||||
Image=docker.io/library/postgres:18-alpine
|
||||
ContainerName=cdc-postgres
|
||||
Network=cdc.network
|
||||
PublishPort=5453:5432
|
||||
Environment=POSTGRES_USER=postgres
|
||||
Environment=POSTGRES_PASSWORD=postgres
|
||||
Environment=POSTGRES_DB=postgres
|
||||
Volume=cdc-postgres-data.volume:/var/lib/postgresql
|
||||
Volume=%h/.local/share/live-inventory-cdc-demo/postgres/init:/docker-entrypoint-initdb.d:ro,Z
|
||||
Exec=postgres -c wal_level=logical -c max_wal_senders=10 -c max_replication_slots=10
|
||||
HealthCmd=pg_isready -U postgres -d postgres
|
||||
HealthInterval=5s
|
||||
HealthTimeout=5s
|
||||
HealthRetries=20
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
TimeoutStartSec=120
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=CDC demo seed data
|
||||
Requires=cdc-postgres.service cdc-debezium.service
|
||||
After=cdc-postgres.service cdc-debezium.service
|
||||
|
||||
[Container]
|
||||
Image=docker.io/library/postgres:18-alpine
|
||||
Network=cdc.network
|
||||
Environment=PGHOST=cdc-postgres
|
||||
Environment=PGUSER=postgres
|
||||
Environment=PGPASSWORD=postgres
|
||||
Environment=PGDATABASE=postgres
|
||||
Volume=%h/.local/share/live-inventory-cdc-demo/scripts:/scripts:ro,Z
|
||||
Exec=sh /scripts/seed.sh
|
||||
|
||||
[Service]
|
||||
Restart=no
|
||||
TimeoutStartSec=180
|
||||
@@ -0,0 +1,2 @@
|
||||
[Network]
|
||||
NetworkName=cdc
|
||||
@@ -0,0 +1,18 @@
|
||||
[Unit]
|
||||
Description=CDC demo Go backend
|
||||
Wants=cdc-postgres.service cdc-nats.service cdc-debezium.service
|
||||
After=cdc-postgres.service cdc-nats.service cdc-debezium.service
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
WorkingDirectory=%h/.local/share/live-inventory-cdc-demo
|
||||
Environment=HTTP_ADDR=:8080
|
||||
Environment=DATABASE_URL=postgres://postgres:postgres@localhost:5453/postgres?sslmode=disable
|
||||
Environment=NATS_URL=nats://localhost:4222
|
||||
Environment=NATS_SUBJECT=postgres.public.inventory
|
||||
ExecStart=%h/.local/bin/inventory-cdc-demo
|
||||
Restart=always
|
||||
RestartSec=3
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
||||
Reference in New Issue
Block a user