-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
72 lines (68 loc) · 1.81 KB
/
Copy pathdocker-compose.yml
File metadata and controls
72 lines (68 loc) · 1.81 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
70
71
72
services:
db:
image: mysql:8.0
container_name: sp500_db
restart: always
environment:
- MYSQL_DATABASE=${DB_NAME:-stocks_db}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-mypassword}
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "${DB_USER:-root}", "-p${MYSQL_ROOT_PASSWORD:-mypassword}"]
interval: 5s
timeout: 5s
retries: 10
db_test:
image: mysql:8.0
container_name: quant4free_test_db
profiles: ["test"]
restart: unless-stopped
environment:
- MYSQL_DATABASE=${Q4F_TEST_DB_NAME:-quant4free_test}
- MYSQL_ROOT_PASSWORD=${Q4F_TEST_MYSQL_ROOT_PASSWORD:-q4f_test_password}
ports:
- "3307:3306"
volumes:
- db_test_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${Q4F_TEST_MYSQL_ROOT_PASSWORD:-q4f_test_password}"]
interval: 5s
timeout: 5s
retries: 10
phpmyadmin:
image: phpmyadmin:latest
container_name: sp500_pma
restart: always
ports:
- "8080:80"
environment:
- PMA_ARBITRARY=1
- PMA_HOST=db
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-mypassword}
depends_on:
db:
condition: service_healthy
app:
build: .
container_name: sp500_worker
depends_on:
db:
condition: service_healthy
volumes:
- .:/app
environment:
- DB_HOST=db
- DB_USER=${DB_USER:-root}
- DB_PASSWORD=${DB_PASSWORD:-mypassword}
- DB_NAME=${DB_NAME:-stocks_db}
- PYTHONPATH=/app
- TZ=Europe/Berlin
working_dir: /app
command: tail -f /dev/null
volumes:
db_data:
db_test_data: