-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
60 lines (55 loc) · 1.3 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
56
57
58
59
60
version: '3.7'
# Creating our network
networks:
webserver:
# Creating volumes for persistence
volumes:
www:
ps_cache:
nginx:
_data:
sock:
# Defining our services
services:
mysql:
# Install MYSQL 8
image: 'mysql:latest'
container_name: mysql
command: --default-authentication-plugin=mysql_native_password
restart: always
environment:
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_RANDOM_ROOT_PASSWORD=yes
ports:
- "3306:3306"
volumes:
- _data:/var/lib/mysql
networks:
- webserver
php:
# Install PHP7.4-FPM
build: './php-fpm'
container_name: php
restart: always
volumes:
- sock:/sock
- www:/var/www/html
networks:
- webserver
nginx:
# Compile Nginx
build: './nginx'
container_name: nginx
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- www:/var/www/html
- nginx:/etc/nginx
- ps_cache:/var/cache/ngx_pagespeed
- sock:/sock
networks:
- webserver