-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
85 lines (81 loc) · 2.27 KB
/
docker-compose.yml
File metadata and controls
85 lines (81 loc) · 2.27 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
services:
floaty-backend:
container_name: floaty-backend
image: matthaeusheer/floaty-backend:0.0.13
build: .
ports:
- "8080:8080" # Exposing the backend on localhost:8080 to access the application from the host
restart: unless-stopped
environment:
- SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE:?SPRING_PROFILES_ACTIVE is required}
- SENDGRID_API_KEY=${SENDGRID_API_KEY:?SENDGRID_API_KEY is required}
- MYSQL_USER=${MYSQL_USER:?MYSQL_USER is required}
- MYSQL_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is required}
networks:
- backend-network
depends_on:
floaty-db-service:
condition: service_healthy
deploy:
resources:
limits:
cpus: '1.5'
memory: 2G
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost:8080/actuator/health" ]
interval: 15s
timeout: 10s
retries: 5
start_period: 60s
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
floaty-db-service:
container_name: floaty-db
image: mysql:8.0
restart: unless-stopped
ports:
- "3306:3306"
networks:
- backend-network
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:?MYSQL_ROOT_PASSWORD is required}
- MYSQL_DATABASE=${MYSQL_DATABASE:?MYSQL_DATABASE is required}
- MYSQL_USER=${MYSQL_USER:?MYSQL_USER is required}
- MYSQL_PASSWORD=${DB_PASSWORD:?DB_PASSWORD is required}
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: /bin/sh -c 'mysql -u root -p"$$MYSQL_ROOT_PASSWORD" --execute "SHOW DATABASES;"'
interval: 3s
retries: 30
timeout: 5s
deploy:
resources:
limits:
cpus: '1'
memory: 2G
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
smtp-server:
profiles: ["dev"]
container_name: floaty-smtp
image: rnwood/smtp4dev
restart: unless-stopped
ports:
- "5001:80" # Expose the web UI on localhost:5001
- "2525:25" # Expose the SMTP server on localhost:2525
networks:
- backend-network
networks:
backend-network:
driver: bridge
name: floaty-network
volumes:
mysql_data:
name: floaty-mysql-data