-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
75 lines (69 loc) · 1.7 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
70
71
72
73
74
75
version: '3.9'
networks:
order:
services:
php:
build:
context: .
container_name: php
hostname: php
restart: always
cap_add:
- SYS_PTRACE
working_dir: /var/www/html
environment:
MYSQL_USER: '${MYSQL_USER}'
MYSQL_PASSWORD: '${MYSQL_PASS}'
MYSQL_DATABASE: '${MYSQL_DB}'
volumes:
- ./php.ini:/usr/local/etc/php/conf.d/extra-php-config.ini:ro
- ./fpm.conf:/usr/local/etc/php-fpm.d/zz-fpm.conf:ro
- ./ordersprinter-entrypoint:/usr/local/bin/docker-php-entrypoint:ro
- ordersprinter:/var/www/html
extra_hosts:
www.ordersprinter.de: 5.35.225.35
networks:
- order
nginx:
image: nginx:1.24.0-alpine
container_name: nginx
hostname: nginx
restart: always
ports:
- '9999:80'
volumes:
- ordersprinter:/var/www/html
- ./nginx.conf:/etc/nginx/conf.d/default.conf:ro
- ./favicon.ico:/favicon.ico:ro
depends_on:
php:
condition: service_started
database:
condition: service_started
networks:
- order
database:
image: mariadb:10.11.7-jammy
container_name: mariadb
hostname: database
restart: always
ports:
- '3306:3306'
environment:
MARIADB_AUTO_UPGRADE: 1
MYSQL_ROOT_PASSWORD: '${MYSQL_ROOT_PASS}'
MYSQL_USER: '${MYSQL_USER}'
MYSQL_PASSWORD: '${MYSQL_PASS}'
MYSQL_DATABASE: '${MYSQL_DB}'
volumes:
- mariadb:/var/lib/mysql
- ./mariadb.cnf:/etc/mysql/conf.d/mariadb.cnf:ro
healthcheck:
test: mysqladmin ping -h 127.0.0.1 -u ${MYSQL_USER} --password=${MYSQL_PASS}
interval: 10s
retries: 5
networks:
- order
volumes:
ordersprinter:
mariadb: