Добавить docker-compose.yml
This commit is contained in:
parent
0fb17c7c3a
commit
69a4ed8d8c
54
docker-compose.yml
Normal file
54
docker-compose.yml
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
version: '3.9'
|
||||||
|
|
||||||
|
services:
|
||||||
|
postgres:
|
||||||
|
image: pgvector/pgvector:pg17
|
||||||
|
container_name: postgres_container
|
||||||
|
environment:
|
||||||
|
POSTGRES_USER: postgres_user
|
||||||
|
POSTGRES_PASSWORD: postgres_password
|
||||||
|
POSTGRES_DB: postgres_db
|
||||||
|
PGDATA: /var/lib/postgresql/data/pgdata
|
||||||
|
ports:
|
||||||
|
- "5430:5432"
|
||||||
|
volumes:
|
||||||
|
- ./pgdata:/var/lib/postgresql/data/pgdata
|
||||||
|
deploy:
|
||||||
|
resources:
|
||||||
|
limits:
|
||||||
|
cpus: '0.50'
|
||||||
|
memory: 512M
|
||||||
|
reservations:
|
||||||
|
cpus: '0.25'
|
||||||
|
memory: 256M
|
||||||
|
command: >
|
||||||
|
postgres -c max_connections=1000
|
||||||
|
-c shared_buffers=256MB
|
||||||
|
-c effective_cache_size=768MB
|
||||||
|
-c maintenance_work_mem=64MB
|
||||||
|
-c checkpoint_completion_target=0.7
|
||||||
|
-c wal_buffers=16MB
|
||||||
|
-c default_statistics_target=100
|
||||||
|
healthcheck:
|
||||||
|
test: [ "CMD-SHELL", "pg_isready -U postgres_user -d postgres_db" ]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 10s
|
||||||
|
retries: 5
|
||||||
|
restart: unless-stopped
|
||||||
|
tty: true
|
||||||
|
stdin_open: true
|
||||||
|
pgadmin:
|
||||||
|
image: dpage/pgadmin4
|
||||||
|
container_name: pgadmin4_container
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- 5016:80
|
||||||
|
user: "$UID:$GID"
|
||||||
|
environment:
|
||||||
|
- PGADMIN_DEFAULT_EMAIL=dtorov@bk.ru
|
||||||
|
- PGADMIN_DEFAULT_PASSWORD=gjlfhjr
|
||||||
|
volumes:
|
||||||
|
- ./pgadmin-data:/var/lib/pgadmin
|
||||||
|
volumes:
|
||||||
|
pgdata:
|
||||||
|
driver: local
|
Loading…
x
Reference in New Issue
Block a user