-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
82 lines (78 loc) · 2.03 KB
/
Copy pathdocker-compose.yml
File metadata and controls
82 lines (78 loc) · 2.03 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
services:
# MySQL Database
mysql:
image: mysql:8.0
container_name: bluemarble-mysql
ports:
- "3307:3306"
environment:
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD:-rootpassword}
MYSQL_DATABASE: ${DB_NAME:-finble}
MYSQL_USER: ${DB_USERNAME:-finble_user}
MYSQL_PASSWORD: ${DB_PASSWORD:-password}
volumes:
- mysql_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/01-init.sql:ro
networks:
- bluemarble-network
restart: unless-stopped
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
# Redis Cache
redis:
image: redis:7-alpine
container_name: bluemarble-redis
ports:
- "6379:6379"
command: redis-server --appendonly yes
volumes:
- redis_data:/data
networks:
- bluemarble-network
restart: unless-stopped
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 3s
retries: 5
start_period: 5s
# Spring Boot Backend
backend:
build:
context: ./finble-backend
dockerfile: Dockerfile
container_name: bluemarble-backend
ports:
- "8081:8081"
environment:
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILE:-docker}
DB_HOST: mysql
DB_PORT: 3306
DB_NAME: ${DB_NAME:-finble}
DB_USERNAME: ${DB_USERNAME:-finble_user}
DB_PASSWORD: ${DB_PASSWORD:-password}
REDIS_HOST: redis
REDIS_PORT: 6379
JWT_SECRET: ${JWT_SECRET:-6f8d3a1c2b4e5f60718293ab4cd5ef60718293ab4cd5ef60a1b2c3d4e5f60718}
GOOGLE_CLIENT_ID: ${GOOGLE_CLIENT_ID:-dummy-client-id}
GOOGLE_CLIENT_SECRET: ${GOOGLE_CLIENT_SECRET:-dummy-client-secret}
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
networks:
- bluemarble-network
restart: unless-stopped
volumes:
- ./logs:/app/logs
networks:
bluemarble-network:
driver: bridge
volumes:
mysql_data:
driver: local
redis_data:
driver: local