refactor docker-compose.yaml
This commit is contained in:
@@ -1,6 +1,24 @@
|
||||
version: '3.8'
|
||||
|
||||
services:
|
||||
db:
|
||||
image: postgres:latest
|
||||
restart: always
|
||||
user: postgres
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: ${PG_USER}
|
||||
POSTGRES_DB: ${PG_DATABASE}
|
||||
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
||||
expose:
|
||||
- ${PG_PORT}
|
||||
healthcheck:
|
||||
test: [ "CMD", "pg_isready", "-U", "${PG_USER}" ]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
web-chat:
|
||||
build:
|
||||
context: .
|
||||
@@ -18,22 +36,5 @@ services:
|
||||
depends_on:
|
||||
- db
|
||||
|
||||
db:
|
||||
image: postgres:latest
|
||||
restart: always
|
||||
user: postgres
|
||||
volumes:
|
||||
- db-data:/var/lib/postgresql/data
|
||||
environment:
|
||||
POSTGRES_USER: ${PG_USER}
|
||||
POSTGRES_DB: ${PG_DATABASE}
|
||||
POSTGRES_PASSWORD: ${PG_PASSWORD}
|
||||
expose:
|
||||
- ${PG_PORT}
|
||||
healthcheck:
|
||||
test: ["CMD", "pg_isready", "-U", "${PG_USER}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
volumes:
|
||||
db-data:
|
||||
|
||||
Reference in New Issue
Block a user