-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 959 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
45 lines (42 loc) · 959 Bytes
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
version: "3.8"
networks:
react-notes-prod:
driver: bridge
services:
next-app-prod:
container_name: next-app
build:
context: .
dockerfile: Dockerfile
env_file:
- .env
- .env.production
restart: always
ports:
- 3000:3000
networks:
- react-notes-prod
depends_on:
mysql:
condition: service_healthy
mysql:
image: mysql:8.0
container_name: next-app-mysql
command: --default-authentication-plugin=caching_sha2_password
restart: unless-stopped
# volumes:
# - ./docker/data/mysql/:/var/lib/mysql/
environment:
- MYSQL_ROOT_PASSWORD=admin
- MYSQL_DATABASE=notes
- MYSQL_USER=notes
- MYSQL_PASSWORD=cpZfriEBbmJjWeiR
ports:
- "3306:3306"
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h127.0.0.1", "-P3306"]
interval: 5s
timeout: 2s
retries: 20
networks:
- react-notes-prod