use env. variables
This commit is contained in:
parent
9dc35c445e
commit
911b25d96b
|
|
@ -1,17 +1,17 @@
|
|||
services:
|
||||
postgres:
|
||||
image: postgres:15-alpine
|
||||
container_name: quote_postgres
|
||||
image: postgres:17-alpine
|
||||
container_name: quote_db
|
||||
environment:
|
||||
POSTGRES_USER: quoteuser
|
||||
POSTGRES_PASSWORD: quotepass123
|
||||
POSTGRES_DB: quotes_db
|
||||
POSTGRES_USER: ${DB_USER}
|
||||
POSTGRES_PASSWORD: ${DB_PASSWORD}
|
||||
POSTGRES_DB: ${DB_NAME}
|
||||
volumes:
|
||||
- postgres_data:/var/lib/postgresql/data
|
||||
- ./init.sql:/docker-entrypoint-initdb.d/01-init.sql
|
||||
- ./add_invoices.sql:/docker-entrypoint-initdb.d/02-add-invoices.sql
|
||||
ports:
|
||||
- "5432:5432"
|
||||
- "5433:5432"
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U quoteuser -d quotes_db"]
|
||||
interval: 10s
|
||||
|
|
@ -25,12 +25,12 @@ services:
|
|||
ports:
|
||||
- "3000:3000"
|
||||
environment:
|
||||
NODE_ENV: production
|
||||
DB_HOST: postgres
|
||||
DB_PORT: 5432
|
||||
DB_USER: quoteuser
|
||||
DB_PASSWORD: quotepass123
|
||||
DB_NAME: quotes_db
|
||||
NODE_ENV: ${NODE_ENV}
|
||||
DB_HOST: ${DB_HOST}
|
||||
DB_PORT: ${DB_PORT}
|
||||
DB_USER: ${DB_USER}
|
||||
DB_PASSWORD: ${DB_PASSWORD}
|
||||
DB_NAME: ${DB_NAME}
|
||||
volumes:
|
||||
- ./public/uploads:/app/public/uploads
|
||||
- ./templates:/app/templates # NEU!
|
||||
|
|
|
|||
Loading…
Reference in New Issue