File size: 2,895 Bytes
ef1ad9e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
version: '3.8'
networks:
my_network:
driver: bridge
services:
postgres:
image: postgres:15
container_name: postgres-db
restart: unless-stopped
environment:
POSTGRES_USER: admin
POSTGRES_PASSWORD: adminpassword
POSTGRES_DB: my_database
ports:
- "5432:5432"
volumes:
- ./postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U admin -d my_database -h localhost"]
interval: 10s
retries: 5
start_period: 20s
timeout: 5s
networks:
- my_network
nginx:
image: nginx:latest
container_name: nginx
ports:
- "8080:80"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- ai-service
- auth-service
- communication-service
- document-service
- loan-service
- user-service
networks:
- my_network
ai-service:
container_name: ai-service
build:
context: ./miralabs-backend/ai-service
ports:
- "8006:80"
networks:
- my_network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
auth-service:
container_name: auth-service
build:
context: ./miralabs-backend/auth-service
env_file:
- ./miralabs-backend/auth-service/.env
ports:
- "8001:8001"
networks:
- my_network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
communication-service:
container_name: communication-service
build:
context: ./miralabs-backend/communication-service
ports:
- "8002:80"
networks:
- my_network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
document-service:
container_name: document-service
build:
context: ./miralabs-backend/document-service
env_file:
- ./miralabs-backend/document-service/.env
ports:
- "8003:80"
networks:
- my_network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
loan-service:
container_name: loan-service
build:
context: ./miralabs-backend/loan-service
ports:
- "8004:80"
networks:
- my_network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
user-service:
container_name: user-service
build:
context: ./miralabs-backend/user-service
env_file:
- ./miralabs-backend/user-service/.env
ports:
- "8005:80"
networks:
- my_network
restart: unless-stopped
depends_on:
postgres:
condition: service_healthy
volumes:
postgres_data:
driver: local
|