-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdocker-compose.yml-prod
127 lines (120 loc) · 3.4 KB
/
docker-compose.yml-prod
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
version: '3.4'
services:
laravel:
image: garutilorenzo/laravel:latest
container_name: laravel
volumes:
- ${LARAVEL_DATA_DIR:-./laravel-project}:/var/www/html
environment:
- MYSQL_USER=${LARAVEL_DB_USER:-app}
- MYSQL_PASSWORD=${LARAVEL_DB_PASSWORD:-password}
- MYSQL_DATABASE=${LARAVEL_DB_NAME:-laravel}
- LARAVEL_DB_HOST=${LARAVEL_DB_HOST:-mysql}
depends_on:
- mysql
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "5"
restart: always
mysql:
image: mariadb:${MARIADB_VERSION:-latest}
container_name: mysql
volumes:
- type: volume
source: mysql
target: /var/lib/mysql
volume:
nocopy: true
# - ./sql:/docker-entrypoint-initdb.d
environment:
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD:-password}
- MYSQL_USER=${MYSQL_USER:-app}
- MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}
- MYSQL_DATABASE=${MYSQL_DATABASE:-laravel}
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "5"
restart: always
nginx:
image: nginx:${NGINX_VERSION:-latest}
container_name: nginx
ports:
- '80:80'
- '443:443'
volumes:
- ${NGINX_TEMPLATE_DIR:-./config}:/etc/nginx/templates:ro
- ${LARAVEL_DATA_DIR:-./laravel-project}:/var/www/html:ro
environment:
- SERVER_NAME=example.com www.example.com
depends_on:
- laravel
# command: "/bin/sh -c 'while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g \"daemon off;\"'" #certobt
logging:
driver: "json-file"
options:
max-size: "1m"
max-file: "5"
restart: always
# scheduler:
# image: garutilorenzo/laravel:latest
# build:
# context: laravel/
# container_name: scheduler
# volumes:
# - ${LARAVEL_DATA_DIR:-./laravel-project}:/var/www/html
# environment:
# - MYSQL_USER=${LARAVEL_DB_USER:-app}
# - MYSQL_PASSWORD=${LARAVEL_DB_USER:-password}
# - MYSQL_DATABASE=${LARAVEL_DB_NAME:-laravel}
# - LARAVEL_DB_HOST=${LARAVEL_DB_HOST:-mysql}
# - CONTAINER_ROLE=scheduler
# depends_on:
# - pgsql
# - laravel
# logging:
# driver: "json-file"
# options:
# max-size: "1m"
# max-file: "5"
# restart: always
# queue-default:
# image: garutilorenzo/laravel:latest
# build:
# context: laravel/
# container_name: queue-default
# volumes:
# - ${LARAVEL_DATA_DIR:-./laravel-project}:/var/www/html
# environment:
# - MYSQL_USER=${LARAVEL_DB_USER:-app}
# - MYSQL_PASSWORD=${LARAVEL_DB_USER:-password}
# - MYSQL_DATABASE=${LARAVEL_DB_NAME:-laravel}
# - LARAVEL_DB_HOST=${LARAVEL_DB_HOST:-mysql}
# - CONTAINER_ROLE=queue
# - QUEUE_NAME=default
# depends_on:
# - pgsql
# - laravel
# logging:
# driver: "json-file"
# options:
# max-size: "1m"
# max-file: "5"
# restart: always
# certbot:
# image: certbot/certbot
# restart: unless-stopped
# volumes:
# - ./data/certbot/conf:/etc/letsencrypt
# - ./data/certbot/www:/var/www/certbot
# entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
# logging:
# driver: "json-file"
# options:
# max-size: "1m"
# max-file: "5"
volumes:
mysql: