-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
37 lines (33 loc) · 970 Bytes
/
docker-compose.yml
File metadata and controls
37 lines (33 loc) · 970 Bytes
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
version: "3.9"
services:
database:
container_name: postgres
image: postgres:16-alpine
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: 12345
POSTGRES_DB: symfony_db # Название базы данных
POSTGRES_HOST_AUTH_METHOD: trust
ports:
- "5432:5432"
php:
container_name: php
build:
context: . # Указывает Dockerfile в корневой директории
volumes:
- .:/var/www/html # Подключение папки с исходным кодом
- ./php.ini:/usr/local/etc/php/conf.d/custom.ini # Подключение php.ini
working_dir: /var/www/html
web:
container_name: nginx
image: nginx:alpine
ports:
- "80:80"
volumes:
- .:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf # Добавьте конфигурацию Nginx
depends_on:
- php
networks:
default:
driver: bridge