-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
137 lines (129 loc) · 3.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
137 lines (129 loc) · 3.34 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
x-app-environment: &app-environment
DB_CONNECTION: mariadb
DB_HOST: db
DB_PORT: "3306"
DB_DATABASE: visitorportal
DB_USERNAME: visitor
DB_PASSWORD: visitor_pw
DB_QUEUE_RETRY_AFTER: "180"
HEALTH_CACHE_STORE: database
HEALTH_QUEUE_STALE_AFTER: "300"
HEALTH_SCHEDULER_STALE_AFTER: "300"
HEALTH_HEARTBEAT_TTL: "600"
services:
web:
build:
context: .
dockerfile: docker/apache/Dockerfile
container_name: besucherportal-web
restart: unless-stopped
command: sh -c "php artisan storage:link && apache2-foreground"
ports:
- "8080:80"
environment:
<<: *app-environment
volumes:
- ./:/var/www/html
depends_on:
- db
- mailhog
user: "${UID:-1000}:${GID:-1000}"
healthcheck:
test: ["CMD", "curl", "-fsS", "http://127.0.0.1/up"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
queue:
build:
context: .
dockerfile: docker/apache/Dockerfile
container_name: besucherportal-queue
restart: unless-stopped
command: php artisan queue:work --sleep=3 --tries=3 --timeout=120 --max-time=3600 --max-jobs=1000 --memory=128
environment:
<<: *app-environment
volumes:
- ./:/var/www/html
depends_on:
db:
condition: service_healthy
mailhog:
condition: service_started
user: "${UID:-1000}:${GID:-1000}"
healthcheck:
test: ["CMD", "php", "artisan", "visitorportal:health", "queue"]
interval: 60s
timeout: 10s
retries: 3
start_period: 180s
scheduler:
build:
context: .
dockerfile: docker/apache/Dockerfile
container_name: besucherportal-scheduler
restart: unless-stopped
command: php artisan schedule:work
environment:
<<: *app-environment
volumes:
- ./:/var/www/html
depends_on:
db:
condition: service_healthy
user: "${UID:-1000}:${GID:-1000}"
healthcheck:
test: ["CMD", "php", "artisan", "visitorportal:health", "scheduler"]
interval: 60s
timeout: 10s
retries: 3
start_period: 180s
db:
image: mariadb:11.4
container_name: besucherportal-db
environment:
MARIADB_DATABASE: visitorportal
MARIADB_USER: visitor
MARIADB_PASSWORD: visitor_pw
MARIADB_ROOT_PASSWORD: root_pw
ports:
- "3306:3306"
volumes:
- dbdata:/var/lib/mysql
healthcheck:
test: [ "CMD", "mariadb-admin" ,"ping", "-h", "localhost" ]
interval: 10s
timeout: 20s
retries: 3
mailhog:
image: mailhog/mailhog:v1.0.1
container_name: besucherportal-mailhog
restart: unless-stopped
ports:
- "8025:8025"
- "1025:1025"
node:
image: node:24-alpine
container_name: besucherportal-node
working_dir: /var/www/html/backend
volumes:
- ./:/var/www/html
ports:
- "5173:5173"
environment:
- CHOKIDAR_USEPOLLING=false
command: sh -lc "npm install && npm run dev -- --host 0.0.0.0 --port 5173"
gotenberg:
image: gotenberg/gotenberg:8.32.0
container_name: besucherportal-gotenberg
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
healthcheck:
test: ["CMD", "curl", "-fsS", "--head", "-o", "/dev/null", "http://127.0.0.1:3000/health"]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
volumes:
dbdata: