Guest User

Untitled

a guest
May 4th, 2024
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.00 KB | None | 0 0
  1. services:
  2.   postgres:
  3.     image: postgres
  4.     ports:
  5.      - "0.0.0.0:5432:5432"
  6.     volumes:
  7.      - ./init.sh:/docker-entrypoint-initdb.d/init.sh
  8.       - ./init.sql:/docker-entrypoint-initdb.d/init.sql
  9.       - ./postgres-data:/var/lib/postgresql/data
  10.     healthcheck:
  11.       test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER_NAME} -d ${POSTGRES_USER_DATABASE_NAME}"]
  12.       interval: 1ms
  13.       retries: 10000
  14.     env_file:
  15.      - .env
  16.  
  17.   rabbitmq:
  18.     image: rabbitmq:3.9-management
  19.     ports:
  20.      - "5672:5672"
  21.       - "15672:15672"
  22.     volumes:
  23.      - ./rabbitmq-data:/var/lib/rabbitmq
  24.     healthcheck:
  25.       test: ["CMD", "rabbitmqctl", "status"]
  26.       interval: 1ms
  27.       retries: 10000
  28.     env_file:
  29.      - .env
  30.  
  31.   user-service-backend:
  32.     ports:
  33.      - "8080:8080"
  34.     build:
  35.       context: .
  36.       dockerfile: Dockerfile
  37.     depends_on:
  38.       rabbitmq:
  39.         condition: service_healthy
  40.       postgres:
  41.         condition: service_healthy
  42.     env_file:
  43.      - .env
  44.  
Advertisement
Add Comment
Please, Sign In to add comment