-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
executable file
·44 lines (40 loc) · 979 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.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:-root}
MYSQL_DATABASE: ${DB_DATABASE:-database}
MYSQL_USER: ${DB_USERNAME:-user}
MYSQL_PASSWORD: ${DB_PASSWORD:-pass}
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