-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
69 lines (64 loc) · 1.79 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
61
62
63
64
65
66
67
68
69
version: '3.7'
networks:
LEMP:
driver: bridge
services:
php:
build:
context: ./app/php
dockerfile: Dockerfile
args:
HOST_USER_ID: ${HOST_USER_ID:-0}
HOST_GROUP_ID: ${HOST_GROUP_ID:-0}
container_name: php
restart: 'unless-stopped'
volumes:
- './www:/var/www'
networks:
- LEMP
nginx:
build:
context: ./app/nginx
dockerfile: Dockerfile
container_name: nginx
ports:
- '80:80'
- '443:443'
restart: 'unless-stopped'
volumes:
- './www:/var/www'
- './app/nginx/conf:/etc/nginx/conf.d'
- './app/nginx/snippets:/etc/nginx/snippets'
- './app/nginx/log:/var/log/nginx'
depends_on:
- php
- mariadb
networks:
- LEMP
mariadb:
image: 'mariadb:10.5.5'
container_name: mariadb
ports:
- 127.0.0.1:3306:3306
restart: 'unless-stopped'
command: --max_allowed_packet=64M
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD:?err}
MYSQL_DATABASE: ${MYSQL_DATABASE:?err}
MYSQL_USER: ${MYSQL_USER:?err}
MYSQL_PASSWORD: ${MYSQL_PASSWORD:?err}
volumes:
- './app/mariadb:/var/lib/mysql'
networks:
- LEMP
postfix:
image: 'boky/postfix'
container_name: postfix
restart: 'always'
environment:
HOSTNAME: ${POSTFIX_HOSTNAME:-postfix-docker}
ALLOWED_SENDER_DOMAINS: ${POSTFIX_ALLOWED_SENDER_DOMAINS:-}
volumes:
- './app/postfix/keys:/etc/opendkim/keys'
networks:
- LEMP