-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
87 lines (82 loc) · 2.48 KB
/
docker-compose.yml
File metadata and controls
87 lines (82 loc) · 2.48 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
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
services:
postgres:
image: postgres:18-alpine
container_name: fantasyrealm-postgres
ports:
- "5432:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER:-fantasyrealm}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB:-fantasyrealm}
volumes:
- postgres_data:/var/lib/postgresql/data
- ../database/sql:/docker-entrypoint-initdb.d:ro
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-fantasyrealm}"]
interval: 5s
timeout: 5s
retries: 5
mongodb:
image: mongo:8.0
container_name: fantasyrealm-mongodb
ports:
- "27017:27017"
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_USER:-fantasyrealm}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DB:-fantasyrealm_logs}
volumes:
- mongo_data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 5s
retries: 5
pgadmin:
image: dpage/pgadmin4:latest
container_name: fantasyrealm-pgadmin
ports:
- "5050:80"
environment:
PGADMIN_DEFAULT_EMAIL: ${PGADMIN_EMAIL:-contact@fantasy-realm.com}
PGADMIN_DEFAULT_PASSWORD: ${PGADMIN_PASSWORD}
PGADMIN_CONFIG_SERVER_MODE: "False"
PGADMIN_CONFIG_MASTER_PASSWORD_REQUIRED: "False"
volumes:
- pgadmin_data:/var/lib/pgadmin
- ./pgadmin/servers.json:/pgadmin4/servers.json:ro
depends_on:
postgres:
condition: service_healthy
api:
build:
context: ../src/backend
dockerfile: Dockerfile
container_name: fantasyrealm-api
ports:
- "5000:8080"
environment:
ASPNETCORE_ENVIRONMENT: Development
ConnectionStrings__PostgreSQL: "Host=postgres;Port=5432;Database=${POSTGRES_DB:-fantasyrealm};Username=${POSTGRES_USER:-fantasyrealm};Password=${POSTGRES_PASSWORD}"
ConnectionStrings__MongoDB: "mongodb://${MONGO_USER:-fantasyrealm}:${MONGO_PASSWORD}@mongodb:27017/${MONGO_DB:-fantasyrealm_logs}?authSource=admin"
Email__Password: ${EMAIL_PASSWORD}
depends_on:
postgres:
condition: service_healthy
mongodb:
condition: service_healthy
frontend:
build:
context: ../src/frontend
dockerfile: Dockerfile
container_name: fantasyrealm-frontend
ports:
- "5173:80"
environment:
VITE_API_URL: http://localhost:5000
depends_on:
- api
volumes:
postgres_data:
mongo_data:
pgadmin_data: