-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
123 lines (116 loc) · 2.51 KB
/
docker-compose.yaml
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
services:
app:
container_name: ${APP_NAME}.service.app
restart: unless-stopped
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
env_file:
- .env
depends_on:
- database
- memcached
working_dir: /var/www/app
volumes:
- .:/var/www/app
networks:
- app_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
nginx:
container_name: ${APP_NAME}.service.nginx
restart: unless-stopped
env_file:
- .env
depends_on:
- app
volumes:
- .:/var/www/app
- ./docker/nginx/nginx.conf:/etc/nginx/nginx.conf
- /var/log/nginx:/var/log/nginx
ports:
- ${NGINX_HTTP_PORTS}
- ${NGINX_HTTPS_PORTS}
networks:
- app_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
supervisor:
container_name: ${APP_NAME}.service.supervisor
restart: unless-stopped
healthcheck:
interval: 10s
timeout: 3s
retries: 3
start_period: 30s
env_file:
- .env
depends_on:
- app
volumes:
- .:/var/www/app
- ./docker/php/supervisor/supervisord.conf:/etc/supervisor/supervisord.conf
networks:
- app_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
memcached:
container_name: ${APP_NAME}.service.memcached
image: memcached
restart: unless-stopped
ports:
- ${MEMCACHED_PORTS}
networks:
- app_network
database:
container_name: ${APP_NAME}.service.db
image: postgres:${POSTGRES_VERSION:-15}-alpine
restart: unless-stopped
environment:
POSTGRES_DB: ${DATABASE_DB_NAME}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_USER: ${DATABASE_USER}
TZ: ${TIMEZONE}
ports:
- ${DATABASE_PORTS}
volumes:
- database_data:/var/lib/postgresql/data:rw
networks:
- app_network
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
redis:
container_name: ${APP_NAME}.service.redis
image: redis:5
restart: unless-stopped
env_file:
- .env
networks:
- app_network
volumes:
- redis_data:/data
command: [ "redis-server", "--appendonly", "yes" ]
logging:
driver: "json-file"
options:
max-size: "10m"
max-file: "3"
volumes:
database_data:
redis_data:
networks:
app_network: