-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
33 lines (33 loc) · 927 Bytes
/
Copy pathcompose.yaml
File metadata and controls
33 lines (33 loc) · 927 Bytes
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
services:
api:
build: .
environment:
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Development}
ASPNETCORE_URLS: ${ASPNETCORE_URLS:-http://+:8080}
SPARKLY_JWT_KEY: ${SPARKLY_JWT_KEY}
ConnectionStrings__Default: "Host=pg;Port=5432;Database=sparkly;Username=sparkly;Password=${POSTGRES_PASSWORD}"
ports:
- "${API_PORT:-8080}:8080"
depends_on:
pg:
condition: service_healthy
redis:
condition: service_healthy
pg:
image: postgres:16
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_USER}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER}"]
interval: 5s
timeout: 3s
retries: 10
redis:
image: redis:7
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 10