-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
94 lines (85 loc) · 2.37 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
90
91
92
93
94
version: '3.9'
networks:
docker_e107_network:
services:
# php apache
php_apache:
build: './containers/php-apache/php/${PHP_VERSION}'
container_name: '${COMPOSE_PROJECT_NAME}_php_apache_container'
ports:
- '${WEB_PORT}:80'
working_dir: /var/www/e107
# environment:
volumes:
- ./source/e107:/var/www/e107
- ./containers/php-apache/apache/sites-enabled:/etc/apache2/sites-enabled
# php.ini
- ./containers/php-apache/php/config/php.ini:/usr/local/etc/php/conf.d/z-php.ini
- ./containers/php-apache/php/config/errors.ini:/usr/local/etc/php/conf.d/z-errors.ini
# logs
- ./logs/apache:/var/log/apache2/logs/
- ./logs/php:/var/sync/logs/
depends_on:
mariadb:
condition: service_healthy
networks:
- docker_e107_network
# mariadb
mariadb:
image: mariadb:10.9.4-jammy
container_name: '${COMPOSE_PROJECT_NAME}_mariadb_container'
restart: always
ports:
- '${DB_PORT}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASS}'
MYSQL_USER: '${MYSQL_USER}'
MYSQL_PASSWORD: '${MYSQL_PASS}'
MYSQL_DATABASE: '${MYSQL_DB}'
volumes:
- ./data/mariadb:/var/lib/mysql
- ./containers/mariadb/my.cnf:/etc/mysql/conf.d/my.cnf
- ./logs/mariadb:/var/log/mysql/
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD
interval: 5s
retries: 5
networks:
- docker_e107_network
# mailhog
mailhog:
image: mailhog/mailhog:v1.0.1
container_name: '${COMPOSE_PROJECT_NAME}_mailhog_container'
tty: true
restart: on-failure
ports:
- '${MAILHOG_SMTP_PORT}:2587'
- '${MAILHOG_WEB_PORT}:8025'
networks:
- docker_e107_network
# cron
cron:
container_name: '${COMPOSE_PROJECT_NAME}_cron_container'
build:
context: ./containers/cron
args:
PHP_VERSION: ${PHP_VERSION}
volumes:
- ./source:/var/www
- ./logs/cron:/var/log/cron
- ./logs/msmtp:/var/log/msmtp
networks:
- docker_e107_network
# adminer
adminer:
image: adminer:4.8.1
container_name: '${COMPOSE_PROJECT_NAME}_adminer_container'
environment:
ADMINER_DEFAULT_SERVER: mariadb
restart: always
ports:
- '${ADMINER_WEB_PORT}:8080'
links:
- mariadb
networks:
- docker_e107_network