-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
46 lines (42 loc) · 1011 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
45
46
version: "3.8"
services:
# PHP service
app:
container_name: symfony6app-php
build: ./docker/php/.
working_dir: /var/www/site
volumes:
- ./app:/var/www/site
networks:
- app-network
# Nginx service
nginx:
container_name: symfony6app-nginx
image: nginx:alpine
working_dir: /var/www/site
ports:
- 8001:80
volumes:
- ./app:/var/www/site
- ./docker/nginx/conf.d/:/etc/nginx/conf.d/
networks:
- app-network
# Mysql service
# change databasename in /docker/mysql/init.sql
mysql:
container_name: symfony6app-mysql
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password --init-file="/tmp/mysql/init.sql"
restart: always
environment:
- MYSQL_ROOT_PASSWORD=P@ssw0rd
volumes:
- ./docker/mysql/my.cnf:/etc/mysql/conf.d/my.cnf
- ./docker/mysql:/tmp/mysql
ports:
- 8989:3306
networks:
- app-network
networks:
app-network:
driver: bridge