ci: stabilize pipeline
This commit is contained in:
@@ -3,13 +3,18 @@ services:
|
||||
image: postgres:15-alpine
|
||||
container_name: merchantsofhope-supplyanddemandportal-database
|
||||
environment:
|
||||
POSTGRES_DB: merchantsofhope_supplyanddemandportal
|
||||
POSTGRES_USER: merchantsofhope_user
|
||||
POSTGRES_PASSWORD: merchantsofhope_password
|
||||
POSTGRES_DB: ${POSTGRES_DB:-merchantsofhope_supplyanddemandportal}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-merchantsofhope_user}
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:?POSTGRES_PASSWORD is not set}
|
||||
expose:
|
||||
- "5432"
|
||||
volumes:
|
||||
- merchantsofhope-supplyanddemandportal-postgres-data:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-merchantsofhope_user}"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
- merchantsofhope-supplyanddemandportal-network
|
||||
|
||||
@@ -20,14 +25,17 @@ services:
|
||||
container_name: merchantsofhope-supplyanddemandportal-backend
|
||||
environment:
|
||||
NODE_ENV: development
|
||||
DATABASE_URL: postgresql://merchantsofhope_user:merchantsofhope_password@merchantsofhope-supplyanddemandportal-database:5432/merchantsofhope_supplyanddemandportal
|
||||
JWT_SECRET: merchantsofhope_jwt_secret_key_2024
|
||||
DATABASE_URL: postgresql://${POSTGRES_USER:-merchantsofhope_user}:${POSTGRES_PASSWORD}@merchantsofhope-supplyanddemandportal-database:5432/${POSTGRES_DB:-merchantsofhope_supplyanddemandportal}
|
||||
JWT_SECRET: ${JWT_SECRET:?JWT_SECRET is not set}
|
||||
HOST: ${BACKEND_HOST:-0.0.0.0}
|
||||
PORT: ${BACKEND_PORT:-3001}
|
||||
expose:
|
||||
- "3001"
|
||||
ports:
|
||||
- "0.0.0.0:${BACKEND_PORT:-3001}:3001"
|
||||
command: >
|
||||
sh -c "npm run migrate && npm run seed && npm run dev"
|
||||
depends_on:
|
||||
- merchantsofhope-supplyanddemandportal-database
|
||||
merchantsofhope-supplyanddemandportal-database:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./backend:/app
|
||||
- /app/node_modules
|
||||
|
||||
Reference in New Issue
Block a user