Initialize the API and add managed app banners.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
postgres:
|
||||
image: postgres:16-alpine
|
||||
container_name: fabric_trade_db
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
POSTGRES_USER: ${POSTGRES_USER:-fabric}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-fabric123}
|
||||
POSTGRES_DB: ${POSTGRES_DB:-fabric_trade}
|
||||
ports:
|
||||
- '${POSTGRES_PORT:-5432}:5432'
|
||||
volumes:
|
||||
- fabric_pg_data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ['CMD-SHELL', 'pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB']
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 10
|
||||
|
||||
api:
|
||||
image: ${API_IMAGE:-fabric-trade-api:latest}
|
||||
container_name: fabric_trade_api
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgres:
|
||||
condition: service_healthy
|
||||
# سکرتها و تنظیمات از فایل .env روی خود سرور
|
||||
env_file:
|
||||
- .env
|
||||
environment:
|
||||
# داخل شبکه Docker هاست دیتابیس همیشه "postgres" است
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER:-fabric}:${POSTGRES_PASSWORD:-fabric123}@postgres:5432/${POSTGRES_DB:-fabric_trade}?schema=public
|
||||
PORT: ${PORT:-3000}
|
||||
ports:
|
||||
- '127.0.0.1:${API_PORT:-3000}:3000'
|
||||
|
||||
volumes:
|
||||
fabric_pg_data:
|
||||
Reference in New Issue
Block a user