Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
112 lines (104 loc) · 2.94 KB
/
Copy pathdocker-compose.yml
File metadata and controls
112 lines (104 loc) · 2.94 KB
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
name: ${COMPOSE_PROJECT_NAME:-faoxima}
x-runtime-logging: &runtime-logging
driver: json-file
options:
max-size: "20m"
max-file: "3"
services:
nginx:
logging: *runtime-logging
image: nginx:1.27-alpine
depends_on:
- app
ports:
- "${HTTP_PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
volumes:
- .:/var/www/faoxima:ro
- ${BOTS_DIR}:/var/www/bots:ro
- ./nginx/conf.d:/etc/nginx/conf.d:ro
- certs:/etc/letsencrypt:ro
- certbot_webroot:/var/www/certbot:ro
restart: unless-stopped
app:
logging: *runtime-logging
image: faoxima_app:latest
build:
context: .
dockerfile: docker/php/Dockerfile
args:
PUID: ${PUID:-33}
PGID: ${PGID:-33}
env_file: .env
environment:
DB_HOST: ${DB_HOST:-db}
DB_NAME: ${MYSQL_DATABASE}
DB_USER: ${MYSQL_USER}
DB_PASS: ${MYSQL_PASSWORD}
DOMAIN: ${DOMAIN}
TELEGRAM_BOT_TOKEN: ${TELEGRAM_BOT_TOKEN}
TELEGRAM_ADMIN_ID: ${TELEGRAM_ADMIN_ID}
FAOXIMA_DOCKER_ENV: "1"
volumes:
- .:/var/www/faoxima
- ./docker/php/pool.d/www.conf:/usr/local/etc/php-fpm.d/zz-pool.conf:ro
depends_on:
db:
condition: service_healthy
restart: unless-stopped
db:
logging: *runtime-logging
stop_grace_period: 120s
image: mysql:8.0
command:
- --default-authentication-plugin=mysql_native_password
- --binlog_expire_logs_seconds=604800
environment:
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
MYSQL_DATABASE: ${MYSQL_DATABASE}
MYSQL_USER: ${MYSQL_USER}
MYSQL_PASSWORD: ${MYSQL_PASSWORD}
volumes:
- db_data:/var/lib/mysql
- ./docker/mysql/conf.d:/etc/mysql/conf.d:ro
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${MYSQL_ROOT_PASSWORD}"]
interval: 5s
timeout: 5s
retries: 20
restart: unless-stopped
redis:
logging: *runtime-logging
image: redis:7-alpine
command: ["redis-server", "/usr/local/etc/redis/redis.conf"]
volumes:
- ./docker/redis/redis.conf:/usr/local/etc/redis/redis.conf:ro
restart: unless-stopped
certbot:
logging: *runtime-logging
image: certbot/certbot
volumes:
- certs:/etc/letsencrypt
- certbot_webroot:/var/www/certbot
entrypoint: ["sh", "-c"]
command: ["trap exit TERM; while :; do certbot renew --webroot -w /var/www/certbot; sleep 12h; done"]
restart: unless-stopped
phpmyadmin:
logging: *runtime-logging
image: phpmyadmin:5
profiles: ["phpmyadmin"]
environment:
PMA_HOST: db
PMA_ABSOLUTE_URI: https://${DOMAIN}/phpmyadmin/
PMA_ALLOW_ROOT: "1"
UPLOAD_LIMIT: ${PMA_UPLOAD_LIMIT:-50M}
volumes:
- ./docker/phpmyadmin/config.user.inc.php:/etc/phpmyadmin/config.user.inc.php:ro
depends_on:
db:
condition: service_healthy
restart: unless-stopped
volumes:
db_data:
certs:
certbot_webroot: