-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
84 lines (79 loc) · 1.96 KB
/
Copy pathdocker-compose.yml
File metadata and controls
84 lines (79 loc) · 1.96 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
x-logging: &default-logging
driver: json-file
options:
max-size: "10m"
max-file: "3"
services:
app:
build:
context: .
dockerfile: Dockerfile
container_name: joint-living-backend
ports:
- "8000:8000"
environment:
SPRING_PROFILES_ACTIVE: prod
ELASTICSEARCH_URIS: http://10.0.0.197:9200
FRONTEND_REDIRECT_URL: https://moneydiary.cloud/oauth2/redirect
MAIL_FROM: noreply@moneydiary.cloud
volumes:
- ./application-secret.yml:/app/application-secret.yml
- /home/ubuntu/app/firebase-service-account.json:/app/firebase-service-account.json
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
logging: *default-logging
restart: always
mysql:
image: mysql:8.0
container_name: joint-living-mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=jointliving
- MYSQL_USER=jointliving
- MYSQL_PASSWORD=jointliving
- TZ=Asia/Seoul
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
expose:
- "3306"
volumes:
- mysql-data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-proot"]
interval: 10s
timeout: 5s
retries: 12
logging: *default-logging
redis:
image: redis:7-alpine
container_name: joint-living-redis
expose:
- "6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 12
logging: *default-logging
nginx:
image: nginx:latest
container_name: joint-living-nginx
ports:
- "80:80"
- "443:443"
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/letsencrypt:/etc/letsencrypt:ro
depends_on:
- app
logging: *default-logging
restart: always
volumes:
mysql-data:
redis-data: