-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
52 lines (47 loc) · 1.08 KB
/
Copy pathdocker-compose.yml
File metadata and controls
52 lines (47 loc) · 1.08 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
version: '3.3'
services:
webapi:
build:
context: ./employees
dockerfile: Dockerfile
container_name: employees_container
ports:
- "7174:80"
depends_on:
mysql:
condition: service_healthy
networks:
- api_network
mysql:
image: mysql:5.7
restart: always
container_name: 'mysql'
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
environment:
MYSQL_DATABASE: 'employee'
MYSQL_ROOT_USER: 'root'
MYSQL_ROOT_PASSWORD: 'password'
MYSQL_USER: 'user123'
MYSQL_PASSWORD: 'password1234'
ports:
- '3306:3306'
expose:
- '3306'
volumes:
- ./db/init.sql:/docker-entrypoint-initdb.d/init.sql
networks:
- api_network
postman:
image: dannydainton/htmlextra
command: run Employee.postman_collection.json -e employee-docker.postman_environment.json -r htmlextra
volumes:
- ./postman:/etc/newman
depends_on:
- webapi
networks:
- api_network
networks:
api_network: