-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
44 lines (40 loc) · 952 Bytes
/
docker-compose.yml
File metadata and controls
44 lines (40 loc) · 952 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
38
39
40
41
42
43
44
version: "3.8"
services:
# PHP service
app:
build: .
container_name: php-app
working_dir: /var/www/
volumes:
- ./:/var/www
networks:
- app-network
# MySQL database service
db:
image: mysql:5.7
container_name: mysql-db
ports:
- "3306:3306"
environment:
MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
env_file:
- ./.env
networks:
- app-network
# Nginx service
nginx:
image: nginx:alpine
container_name: php-nginx
ports:
- 8000:80
volumes:
- ./:/var/www
- ./nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
networks:
app-network:
driver: bridge