Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
69 lines (64 loc) · 1.53 KB
/
Copy pathdocker-compose.yml
File metadata and controls
69 lines (64 loc) · 1.53 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
services:
web:
container_name: simplePythonFlask
image: simple-python-flask
build:
context: .
environment:
DB_HOST: mariadb
DB_PASSWORD: qwe123qwe
APP_VERSION: compose
ports:
- 5000:5000
depends_on:
web_initiate_db:
condition: service_completed_successfully
web_initiate_db:
container_name: simple-python-flask_init_db
image: simple-python-flask
build:
context: .
command: ["python3", "create_db.py"]
environment:
DB_HOST: mariadb
DB_PASSWORD: qwe123qwe
depends_on:
mariadb:
condition: service_healthy
mariadb:
container_name: mariadb
image: mariadb:11
restart: always
environment:
MARIADB_ROOT_PASSWORD: "qwe123qwe"
volumes:
- mariadb_data:/var/lib/mysql
healthcheck:
test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
interval: 10s
timeout: 5s
retries: 10
# Testes funcionais: docker compose --profile test run --rm functional
selenium:
container_name: selenium
image: selenium/standalone-firefox
profiles: ["test"]
ports:
- 4444:4444
- 7900:7900
shm_size: '2gb'
functional:
image: simple-python-flask-test
build:
context: .
target: test
profiles: ["test"]
command: ["python3", "tests/functional/test_functional.py"]
environment:
APP_URL: http://web:5000
SELENIUM_URL: http://selenium:4444/wd/hub
depends_on:
- web
- selenium
volumes:
mariadb_data: