-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
53 lines (51 loc) · 1.12 KB
/
Copy pathdocker-compose.yml
File metadata and controls
53 lines (51 loc) · 1.12 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
services:
app:
image: qhieu05/mini-social-be:latest
container_name: mini-social-be-app
restart: unless-stopped
ports:
- "127.0.0.1:8080:8080"
env_file:
- .env
depends_on:
mysql:
condition: service_healthy
networks:
- backend-network
mem_limit: 1g
cpus: 1.0
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
mysql:
image: mysql:8.0
container_name: mini-social-be-db
restart: unless-stopped
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: isocial_network
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
volumes:
- /opt/data/mini-social-be/mysql:/var/lib/mysql
ports:
- "127.0.0.1:3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
networks:
- backend-network
mem_limit: 512m
cpus: 0.5
logging:
driver: json-file
options:
max-size: "10m"
max-file: "3"
networks:
backend-network:
external: true