Skip to content

Commit d8edc8f

Browse files
committed
refactor: 원격 서버 postgres 사용
1 parent 21a0bbb commit d8edc8f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

compose.prod.yml

+23
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ services:
3030
- frontend
3131
- backend
3232
depends_on:
33+
postgres:
34+
condition: service_healthy
3335
redis:
3436
condition: service_healthy
3537
healthcheck:
@@ -58,6 +60,8 @@ services:
5860
- frontend
5961
- backend
6062
depends_on:
63+
postgres:
64+
condition: service_healthy
6165
redis:
6266
condition: service_healthy
6367
restart: always
@@ -72,6 +76,8 @@ services:
7276
- frontend
7377
- backend
7478
depends_on:
79+
postgres:
80+
condition: service_healthy
7581
backend:
7682
condition: service_healthy
7783
redis:
@@ -92,6 +98,23 @@ services:
9298
start_period: 10s
9399
restart: always
94100

101+
102+
postgres:
103+
image: growth123/postgres-pgvector-mecab
104+
env_file:
105+
- .env.server
106+
volumes:
107+
- postgres_data:/var/lib/postgresql/data
108+
networks:
109+
- net
110+
healthcheck:
111+
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
112+
interval: 10s
113+
timeout: 5s
114+
retries: 5
115+
ports:
116+
- "5432:5432"
117+
95118
redis:
96119
image: redis:latest
97120
env_file:

0 commit comments

Comments
 (0)