From 8273674babb94a1778b77d48d04c40151fdd28d7 Mon Sep 17 00:00:00 2001 From: GengY Date: Wed, 28 Feb 2024 17:08:52 +0800 Subject: [PATCH] modify(dev-dbs): modify dev-dbs stack --- dev-dbs/dbs.networks.set.yml | 8 +------- dev-dbs/etcd.yml | 5 ++++- dev-dbs/mongo.yml | 6 +++++- dev-dbs/percona.yml | 4 ++++ dev-dbs/{postgre.yml => postgres.yml} | 10 ++++++++-- dev-dbs/redis.yml | 7 +++++-- memos/docker-compose.yml | 5 ++++- 7 files changed, 31 insertions(+), 14 deletions(-) rename dev-dbs/{postgre.yml => postgres.yml} (52%) diff --git a/dev-dbs/dbs.networks.set.yml b/dev-dbs/dbs.networks.set.yml index 4d09a7a..6102710 100644 --- a/dev-dbs/dbs.networks.set.yml +++ b/dev-dbs/dbs.networks.set.yml @@ -10,10 +10,4 @@ networks: - subnet: 172.22.10.0/24 volumes: - mysql_data: - mysql_logs: - redis_data: - etcd-data: - postgresql_data: - mongo_data: - mongo_configdb: \ No newline at end of file + redis_data: \ No newline at end of file diff --git a/dev-dbs/etcd.yml b/dev-dbs/etcd.yml index a70f8bc..8ee483b 100644 --- a/dev-dbs/etcd.yml +++ b/dev-dbs/etcd.yml @@ -14,4 +14,7 @@ services: - etcd - --data-dir=/etcd-data - --listen-client-urls=http://0.0.0.0:2379 - - --advertise-client-urls=http://0.0.0.0:2379 \ No newline at end of file + - --advertise-client-urls=http://0.0.0.0:2379 + +volumes: + etcd-data: \ No newline at end of file diff --git a/dev-dbs/mongo.yml b/dev-dbs/mongo.yml index 62418ba..ca203cb 100644 --- a/dev-dbs/mongo.yml +++ b/dev-dbs/mongo.yml @@ -13,4 +13,8 @@ services: - "27017:27017" networks: DevNet: - ipv4_address: 172.22.10.209 \ No newline at end of file + ipv4_address: 172.22.10.209 + +volumes: + mongo_data: + mongo_configdb: \ No newline at end of file diff --git a/dev-dbs/percona.yml b/dev-dbs/percona.yml index 93b4859..e731cdd 100644 --- a/dev-dbs/percona.yml +++ b/dev-dbs/percona.yml @@ -13,3 +13,7 @@ services: networks: DevNet: ipv4_address: 172.22.10.206 + +volumes: + mysql_data: + mysql_logs: \ No newline at end of file diff --git a/dev-dbs/postgre.yml b/dev-dbs/postgres.yml similarity index 52% rename from dev-dbs/postgre.yml rename to dev-dbs/postgres.yml index 7d44c95..fcce630 100644 --- a/dev-dbs/postgre.yml +++ b/dev-dbs/postgres.yml @@ -1,5 +1,8 @@ +# docker compose -p dbs -f ./dev-dbs/dbs.networks.set.yml -f ./dev-dbs/postgres.yml up +# docker compose -p dbs -f ./dev-dbs/dbs.networks.set.yml -f ./dev-dbs/postgres.yml up -d services: - postgre: + + postgres: image: postgres:16.2-bookworm container_name: Dev-postgre restart: always @@ -11,4 +14,7 @@ services: - "5432:5432" networks: DevNet: - ipv4_address: 172.22.10.208 \ No newline at end of file + ipv4_address: 172.22.10.208 + +volumes: + postgresql_data: \ No newline at end of file diff --git a/dev-dbs/redis.yml b/dev-dbs/redis.yml index 8842750..5dcb932 100644 --- a/dev-dbs/redis.yml +++ b/dev-dbs/redis.yml @@ -1,6 +1,6 @@ services: redis: - image: redis:6-alpine + image: redis:7.2.4-alpine container_name: Dev-Redis restart: always command: "--requirepass Kevin#0412&Redis" @@ -10,4 +10,7 @@ services: - "6379:6379" networks: DevNet: - ipv4_address: 172.22.10.205 \ No newline at end of file + ipv4_address: 172.22.10.205 + +volumes: + redis_data: \ No newline at end of file diff --git a/memos/docker-compose.yml b/memos/docker-compose.yml index 2d53a7c..3d63232 100644 --- a/memos/docker-compose.yml +++ b/memos/docker-compose.yml @@ -7,4 +7,7 @@ services: volumes: - /data/volumes/memos/data:/var/opt/memos ports: - - 5230:5230 \ No newline at end of file + - 5230:5230 + environment: + - MEMOS_DRIVER=postgres + - MEMOS_DSN=postgresql://pgmemos:KevinGunn#0412@192.168.100.184:5432/memos \ No newline at end of file