feat: PostgreSQL 17 вместо SQLite
pg + connect-pg-simple, async routes, docker-compose, скрипт setup-postgres. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:17
|
||||
container_name: shop-postgres
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
POSTGRES_USER: shop
|
||||
POSTGRES_PASSWORD: shop
|
||||
POSTGRES_DB: shop
|
||||
ports:
|
||||
- '5432:5432'
|
||||
volumes:
|
||||
- shop_pg_data:/var/lib/postgresql/data
|
||||
- ./postgres/init:/docker-entrypoint-initdb.d:ro
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U shop -d shop']
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
volumes:
|
||||
shop_pg_data:
|
||||
Reference in New Issue
Block a user