-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
48 lines (45 loc) · 1.15 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
version: '3.7'
services:
nginx:
image: nginx:latest
container_name: nginx
ports:
- "80:80"
volumes:
- ./default.conf:/etc/nginx/conf.d/default.conf # Nginx 설정 파일 경로 수정
- ./Front:/var/www/html/Front # Front 폴더를 웹 루트로 매핑
depends_on:
- php
- mysql
networks:
- app-network
php:
image: php:8.3.7-fpm
container_name: php
restart: unless-stopped
volumes:
- ./php/php.ini:/usr/local/etc/php/php.ini # PHP 설정 파일 경로 수정
- ./Front:/var/www/html/Front # Front 폴더를 웹 루트로 매핑
networks:
- app-network
command:
- /bin/sh
- -c
- |
echo "security.limit_extensions = .html .htm .php" >> /usr/local/etc/php-fpm.d/www.conf
php-fpm
mysql:
image: mysql:5.7
container_name: mysql
environment:
MYSQL_ROOT_PASSWORD: "1234"
MYSQL_DATABASE: "WithoutU"
ports:
- "3306:3306"
volumes:
- ./init.sql:/docker-entrypoint-initdb.d/init.sql # 초기화 SQL 파일 경로 수정
networks:
- app-network
networks:
app-network:
driver: bridge