add pg
This commit is contained in:
parent
d956f84fad
commit
5fa3296fca
|
|
@ -0,0 +1,36 @@
|
||||||
|
networks:
|
||||||
|
medicine-network:
|
||||||
|
external: true
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
postgres-data:
|
||||||
|
name: medicine-postgres-data
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: postgres:15
|
||||||
|
container_name: medicine-postgres
|
||||||
|
restart: always
|
||||||
|
shm_size: 1gb
|
||||||
|
command: >
|
||||||
|
postgres
|
||||||
|
-c shared_buffers=512MB
|
||||||
|
-c work_mem=4MB
|
||||||
|
-c max_connections=200
|
||||||
|
networks:
|
||||||
|
- medicine-network
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: ${POSTGRES_USER:-postgres}
|
||||||
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
|
||||||
|
interval: 10s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 5
|
||||||
|
volumes:
|
||||||
|
- postgres-data:/var/lib/postgresql/data
|
||||||
|
logging:
|
||||||
|
driver: "json-file"
|
||||||
|
options:
|
||||||
|
max-size: "5m"
|
||||||
|
max-file: "10"
|
||||||
Loading…
Reference in New Issue