first commit

This commit is contained in:
2026-08-26 22:39:33 +03:00
commit 2ade668e3e
10 changed files with 1640 additions and 0 deletions
+35
View File
@@ -0,0 +1,35 @@
services:
car-service-db:
image: postgres:16-alpine
container_name: car-service-db
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-car_service}
POSTGRES_USER: ${POSTGRES_USER:-car_service_app}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-change-me-in-production}
ports:
- "${POSTGRES_PORT:-5432}:5432"
volumes:
- car_service_data:/var/lib/postgresql/data
- ./init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
interval: 5s
timeout: 5s
retries: 10
car-service-web:
build: .
container_name: car-service-web
restart: unless-stopped
environment:
PORT: 3000
DATABASE_URL: postgresql://${POSTGRES_USER:-car_service_app}:${POSTGRES_PASSWORD:-change-me-in-production}@car-service-db:5432/${POSTGRES_DB:-car_service}
ports:
- "${WEB_PORT:-3000}:3000"
depends_on:
car-service-db:
condition: service_healthy
volumes:
car_service_data: