-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
46 lines (38 loc) · 930 Bytes
/
docker-compose.yaml
File metadata and controls
46 lines (38 loc) · 930 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
services:
database:
image: mysql:8.0.40-oracle
container_name: mysql_db
hostname: mysql_db
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_DATABASE: '${DB_NAME}'
volumes:
- ./database/imitter_schema.sql:/docker-entrypoint-initdb.d/imitter_schema.sql
- ./db_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
networks:
- connection
api:
container_name: imitter_api
build:
context: .
dockerfile: Dockerfile
ports:
- 8080:8080
networks:
- connection
extra_hosts:
- "host.docker.internal:host-gateway"
depends_on:
database:
condition: service_healthy
volumes:
db_data:
networks:
connection: