-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
executable file
·55 lines (54 loc) · 1.35 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
52
53
54
55
# On setup
# - Search and replace networkname with your preferred local network name
# - remember that database parameters are referenced in the parent .env file (symlinked)
version: "3.8"
networks:
networkname:
driver: bridge
services:
mysql:
image: mysql:8.0
platform: linux/amd64
container_name: mysql
working_dir: /application
volumes:
- ../.local_docker:/var/lib/mysql
- ..:/application
environment:
- MYSQL_ROOT_PASSWORD=${DB_ROOT_PASSWORD}
- MYSQL_DATABASE=${DB_DATABASE}
- MYSQL_USER=${DB_USERNAME}
- MYSQL_PASSWORD=${DB_PASSWORD}
ports:
- "${DB_PORT}:3306"
networks:
- networkname
webserver:
image: nginx:alpine
container_name: nginx
working_dir: /application
volumes:
- ..:/application
- ./nginx/nginx.conf:/etc/nginx/conf.d/default.conf
- ../storage/logs/nginx:/var/log/nginx/
ports:
- 80:80
- 443:443
networks:
- networkname
php-fpm:
build: ./php-fpm
container_name: php-server
working_dir: /application
volumes:
- ..:/application
- ./php-fpm/php-ini-overrides.ini:/etc/php/8.0/fpm/conf.d/99-overrides.ini
networks:
- networkname
mailhog:
image: 'mailhog/mailhog:latest'
ports:
- 1025:1025
- 8025:8025
networks:
- networkname