forked from trekawek/air-quality-info
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
89 lines (78 loc) · 2.11 KB
/
docker-compose.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
version: '3.4'
x-mysql-variables: &mysql-variables
MYSQL_DATABASE: air_quality_info
MYSQL_USER: air_quality_info
MYSQL_PASSWORD: test
MYSQL_ROOT_PASSWORD: test
MYSQL_ROOT_HOST: "%"
AQI_CONFIG: /etc/aqi/config.php
AQI_PATH: /var/www/html
x-fpm-volumes: &fpm-volumes
- ./src/htdocs:/var/www/html
- ./src/cli:/usr/local/bin/aqi
- ./config.php:/etc/aqi/config.php
- ./var-data/var-aqi:/var/aqi
- ./var-data/log:/usr/local/var/log/php-fpm
services:
fpm:
build: docker-img/fpm
environment: *mysql-variables
volumes: *fpm-volumes
restart: on-failure
phpmyadmin:
image: phpmyadmin/phpmyadmin
environment: *mysql-variables
ports:
- "127.0.0.1:8081:80"
restart: on-failure
db:
image: mysql:8
environment: *mysql-variables
volumes:
- ./mysql-data:/var/lib/mysql
- ./src/mysql-schema.sql:/docker-entrypoint-initdb.d/mysql-schema.sql
restart: on-failure
cap_add:
- SYS_NICE
nginx:
image: nginx:1.16-alpine
ports:
- "127.0.0.1:8080:80"
volumes:
- ./src/htdocs:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf
restart: on-failure
minio:
image: minio/minio:RELEASE.2020-10-18T21-54-12Z
ports:
- "127.0.0.1:9000:9000"
environment:
MINIO_ACCESS_KEY: minio
MINIO_SECRET_KEY: minio123
command: server /data
volumes:
- ./var-data/s3:/data
restart: on-failure
beanstalkd:
build: docker-img/beanstalkd
volumes:
- ./var-data/beanstalkd:/data
restart: on-failure
job-handler:
build: docker-img/fpm
environment: *mysql-variables
command: /usr/local/bin/php /usr/local/bin/aqi/job-handler.php
volumes: *fpm-volumes
restart: on-failure
sensor-fetcher:
build: docker-img/fpm
environment: *mysql-variables
command: /usr/local/bin/php /usr/local/bin/aqi/fetch-sensors.php
volumes: *fpm-volumes
restart: on-failure
csv-uploader:
build: docker-img/fpm
environment: *mysql-variables
command: /usr/local/bin/php /usr/local/bin/aqi/upload-csv.php
volumes: *fpm-volumes
restart: on-failure