-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
39 lines (36 loc) · 997 Bytes
/
Copy pathdocker-compose.yml
File metadata and controls
39 lines (36 loc) · 997 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
version: '3.4'
services:
smart.meters:
image: engrmnasirilyas716/smartmeters:latest
# image: ${DOCKER_REGISTRY-}smartmeters
# build:
# context: .
# dockerfile: Smart.Meters/Dockerfile
depends_on:
db:
condition: service_healthy
environment:
- DB_CONNECTION_STRING=Server=db;Database=mydb;User=appuser;Password=appuserpass;
db:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: my-secret-pw
MYSQL_DATABASE: mydb
MYSQL_USER: appuser
MYSQL_PASSWORD: appuserpass
ports:
- "3306:3306"
healthcheck:
# test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
# test: ['CMD-SHELL', 'mysqladmin ping -h 127.0.0.1 --password="password" --silent']
# timeout: 20s
# retries: 10
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
volumes:
- db_data:/var/lib/mysql
volumes:
db_data: