-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
49 lines (44 loc) · 1.08 KB
/
docker-compose.yaml
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
services:
#Init the database service.
db:
image: mysql:latest
container_name: database
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: treated_db
MYSQL_USER: filipy
MYSQL_PASSWORD: root
restart: on-failure
networks:
- project_network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "db"]
interval: 20s
retries: 10
#Init the python service loading and running all of the scripts.
python_scripts:
command: ["python", "etl_script.py"]
container_name: python_script
build:
context: ./files
dockerfile: Dockerfile
depends_on:
db:
condition: service_healthy
networks:
- project_network
#Init the phpmyadmin service to lookup and administrate the databases of my db service.
phpmyadmin:
image: phpmyadmin:latest
container_name: phpmyadmin
environment:
- MYSQL_ROOT_PASSWORD=root
- PMA_ARBITRARY=1
- PMA_HOST=db
ports:
- "8080:80"
networks:
- project_network
networks:
project_network:
driver: bridge