-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
95 lines (89 loc) · 2.09 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
95
services:
database:
image: mariadb:10.11.2
container_name: ${APP_NAME}_mariadb
ports:
- ${DB_PORT}:3306
volumes:
- "./data/mysql:/var/lib/mysql"
restart: always
env_file:
- .env
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
networks:
- php8phalcon5
redis:
container_name: ${APP_NAME}_redis
image: redis:7.2.1
command: redis-server --save 20 1 --loglevel warning
volumes:
- "./data/redis:/data"
ports:
- ${REDIS_PORT}:6379
restart: always
networks:
- php8phalcon5
php:
container_name: ${APP_NAME}_php
build:
context: ./src
dockerfile: ./php/Dockerfile
working_dir: /var/www/html
volumes:
- "./config/php/timezone.ini:/usr/local/etc/php/conf.d/timezone.ini"
- "./config/php/file.ini:/usr/local/etc/php/conf.d/file.ini"
- "./config/crontabs/root:/var/spool/cron/crontabs/root"
- "./www:/var/www/html"
depends_on:
- database
- redis
links:
- database
- redis
command: bash -c "php-fpm"
restart: always
networks:
- php8phalcon5
nginx:
container_name: ${APP_NAME}_nginx
build:
context: ./src
dockerfile: ./nginx/Dockerfile
command: ["nginx", "-g", "daemon off;"]
working_dir: /var/www/html
depends_on:
- php
- database
volumes:
- "./config/nginx/conf.d:/etc/nginx/conf.d/"
- "./data/nginx:/var/log/nginx"
- "./www:/var/www/html"
ports:
- ${APP_PORT}:80
links:
- php
restart: always
networks:
- php8phalcon5
phpmyadmin:
container_name: ${APP_NAME}_phpmyadmin
image: phpmyadmin/phpmyadmin
links:
- database
depends_on:
- database
ports:
- ${PMA_PORT}:80
environment:
PMA_HOST: ${APP_NAME}_mariadb
PMA_USER: ${MYSQL_USER}
PMA_PASSWORD: ${MYSQL_PASSWORD}
networks:
- php8phalcon5
networks:
php8phalcon5:
driver: bridge