fix the restart policy
This commit is contained in:
+13
-3
@@ -1,6 +1,13 @@
|
|||||||
services:
|
services:
|
||||||
timescaledb:
|
timescaledb:
|
||||||
image: timescale/timescaledb:latest-pg16
|
image: timescale/timescaledb:latest-pg16
|
||||||
|
restart: unless-stopped
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD-SHELL", "pg_isready -U postgres -d micrometeo"]
|
||||||
|
interval: 5s
|
||||||
|
timeout: 3s
|
||||||
|
retries: 12
|
||||||
|
start_period: 20s
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_PASSWORD: postgres
|
POSTGRES_PASSWORD: postgres
|
||||||
POSTGRES_USER: postgres
|
POSTGRES_USER: postgres
|
||||||
@@ -17,7 +24,8 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
depends_on:
|
depends_on:
|
||||||
- timescaledb
|
timescaledb:
|
||||||
|
condition: service_healthy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
@@ -29,7 +37,8 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.train
|
dockerfile: Dockerfile.train
|
||||||
depends_on:
|
depends_on:
|
||||||
- timescaledb
|
timescaledb:
|
||||||
|
condition: service_healthy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
environment:
|
environment:
|
||||||
DATABASE_URL: "postgres://postgres:postgres@timescaledb:5432/micrometeo?sslmode=disable"
|
DATABASE_URL: "postgres://postgres:postgres@timescaledb:5432/micrometeo?sslmode=disable"
|
||||||
@@ -64,7 +73,8 @@ services:
|
|||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile.train
|
dockerfile: Dockerfile.train
|
||||||
depends_on:
|
depends_on:
|
||||||
- timescaledb
|
timescaledb:
|
||||||
|
condition: service_healthy
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
profiles: ["shadow"]
|
profiles: ["shadow"]
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
Reference in New Issue
Block a user