-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
42 lines (40 loc) · 1.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
42 lines (40 loc) · 1.12 KB
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
services:
# 1. Database: MS SQL Server
db:
image: mcr.microsoft.com/mssql/server:2022-latest
container_name: nafath-sql
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=Password123
- MSSQL_PID=Developer
ports:
- "1433:1433"
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P 'Password123' -Q 'SELECT 1' -C"]
interval: 10s
timeout: 5s
retries: 5
# 2. Backend: Spring Boot
backend:
build: ./backend
container_name: nafath-backend
ports:
- "8080:8080"
environment:
- SPRING_DATASOURCE_URL=jdbc:sqlserver://db:1433;databaseName=nafath_db;encrypt=true;trustServerCertificate=true
- SPRING_DATASOURCE_USERNAME=sa
- SPRING_DATASOURCE_PASSWORD=Password123
- SPRING_JPA_HIBERNATE_DDL_AUTO=update
depends_on:
db:
condition: service_healthy
# 3. Frontend: Next.js
frontend:
build: ./frontend
container_name: nafath-frontend
ports:
- "3000:3000"
environment:
- NEXT_PUBLIC_API_BASE=http://localhost:8080/nafath/api/v1
depends_on:
- backend