-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
44 lines (41 loc) · 954 Bytes
/
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
version: '3'
networks:
backend:
driver: bridge
services:
phpapache:
build: ./php
ports:
- "80:80"
- "443:443"
depends_on:
- mysql
volumes:
- ./html:/var/www/html
- /etc/letsencrypt:/etc/letsencrypt
- ./php/default.conf:/etc/apache2/sites-available/000-default.conf
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
restart: always
networks:
- backend
mysql:
image: mariadb:10.8.5
expose:
- 3306
restart: always
volumes:
- mysql_data:/var/lib/mysql
- ./mysql/sql/init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
TZ: Asia/Taipei
networks:
- backend
volumes:
mysql_data: