-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
47 lines (45 loc) · 1.31 KB
/
Copy pathdocker-compose.prod.yml
File metadata and controls
47 lines (45 loc) · 1.31 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
# docker-compose.prod.yml
# Production only — no Postgres (using RDS), no Flyway (migrations run at deploy time)
# Deployed on EC2, managed via SSM RunCommand
# Required env vars on EC2: IMAGE_TAG, RDS_ENDPOINT
services:
nginx:
image: ghcr.io/buffden/tinyurl-nginx:${IMAGE_TAG}
container_name: tinyurl-nginx
ports:
- "80:80"
- "443:443"
volumes:
- /etc/letsencrypt:/etc/letsencrypt:ro
depends_on:
app:
condition: service_healthy
restart: unless-stopped
logging:
driver: awslogs
options:
awslogs-group: /tinyurl/prod
awslogs-region: us-east-1
awslogs-stream: nginx
app:
image: ghcr.io/buffden/tinyurl-api:${IMAGE_TAG}
container_name: tinyurl-app
environment:
SPRING_PROFILES_ACTIVE: prod
SPRING_DATASOURCE_URL: jdbc:postgresql://${RDS_ENDPOINT}:5432/tinyurl_production_db
TINYURL_FRONTEND_URL: https://tinyurl.buffden.com
expose:
- "8080"
healthcheck:
test: ["CMD-SHELL", "wget -qO- http://localhost:8080/actuator/health || exit 1"]
interval: 30s
timeout: 5s
retries: 3
start_period: 60s
restart: unless-stopped
logging:
driver: awslogs
options:
awslogs-group: /tinyurl/prod
awslogs-region: us-east-1
awslogs-stream: app