-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (47 loc) · 1.19 KB
/
docker-compose.yml
File metadata and controls
50 lines (47 loc) · 1.19 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
# docker-compose.yml
services:
mysql:
image: mysql:8.0
container_name: mysql-db
command: --secure-file-priv=""
restart: always
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: cs348_project
ports:
- "3307:3306"
volumes:
- mysql_data:/var/lib/mysql
- ./mysql-init:/docker-entrypoint-initdb.d
- ./cleanedsports.csv:/docker-entrypoint-initdb.d/cleanedsports.csv
- ./other-sql/test-production.sql:/other-sql/test-production.sql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
timeout: 20s
retries: 10
data-loader:
image: node:18-alpine
container_name: data-loader
working_dir: /app
volumes:
- ./:/app
environment:
- DB_HOST=mysql
- DB_PORT=3306
- DB_USER=root
- DB_PASSWORD=${DB_PASSWORD}
- DB_NAME=cs348_project
depends_on:
mysql:
condition: service_healthy
command: sh -c "npm install && node loaddata.js"
phpmyadmin:
image: phpmyadmin/phpmyadmin
restart: always
ports:
- "8080:80"
environment:
PMA_HOST: mysql
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
volumes:
mysql_data: