-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
51 lines (45 loc) · 1.03 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
version: "3.8"
volumes:
mysql-data:
driver: local
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:8.0.25
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
volumes:
- mysql-data:/var/lib/mysql
networks:
- app-network
# Nginx service
nginx:
image: nginx:1.20.0
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