-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
99 lines (93 loc) · 2.62 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
96
97
98
99
version: "3.8"
services:
webserver:
build:
context: ./src/
dockerfile: Dockerfile.php81
container_name: "${WEBSERVER_CONTAINER_NAME}"
volumes:
- ./src/backend:/var/www/html
- ./config/php/php.ini:/usr/local/etc/php/php.ini
- ./config/ssl:/etc/apache2/ssl/
- ./config/vhosts:/etc/apache2/sites-enabled
- ./logs/apache2:/var/log/apache2
- ./config/etc/hosts:/etc/hosts
- ./config/etc/supervisord.conf:/etc/supervisor/conf.d/supervisord.conf
restart: "always"
depends_on:
- mysql
- redis
links:
- mysql
- redis
environment:
PMA_PORT: ${PMA_UNSECURE_PORT}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_PORT: ${MYSQL_PORT}
REDIS_HOST: redis
MYSQL_HOST: mysql
ports:
- "${WEBSERVER_UNSECURE_HOST_PORT-80}:80"
- "${WEBSERVER_SECURE_HOST_PORT-443}:443"
mysql:
build:
context: ./src/
dockerfile: Dockerfile.mariadb106
container_name: "${MYSQL_CONTAINER_NAME}"
restart: "always"
ports:
- "127.0.0.1:${MYSQL_PORT-3306}:3306"
volumes:
- ./config/initdb:/docker-entrypoint-initdb.d
- ./data/mysql:/var/lib/mysql
- ./logs/mysql:/var/log/mysql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
phpmyadmin:
image: phpmyadmin
container_name: "${PMA_CONTAINER_NAME}"
links:
- mysql
environment:
PMA_HOST: mysql
PMA_PORT: 3306
PMA_USER: root
PMA_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
ports:
- "${PMA_UNSECURE_PORT-8081}:80"
- "${PMA_SECURE_PORT-8082}:443"
volumes:
- ./data/phpmyadmin:/sessions
- ./config/php/php.ini:/usr/local/etc/php/conf.d/php-phpmyadmin.ini
redis:
container_name: "${REDIS_CONTAINER_NAME}"
image: redis:latest
volumes:
- ./data/redis:/data
ports:
- "127.0.0.1:${REDIS_PORT-6379}:6379"
frontend:
build:
context: ./src/
dockerfile: Dockerfile.node18
container_name: "${FRONTEND_CONTAINER_NAME}"
restart: "always"
depends_on:
- webserver
ports:
- ${FRONTEND_HOST_PORT-3000}:3000
- ${NUXT_HMR_PORT-24678}:24678
volumes:
- ./src/frontend:/frontend
- node_modules-data:/frontend/node_modules
volumes:
node_modules-data: