-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
111 lines (107 loc) · 3.32 KB
/
Copy pathdocker-compose.yml
File metadata and controls
111 lines (107 loc) · 3.32 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
services:
app:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
db:
condition: service_healthy
environment:
APP_ENV: production
APP_DEBUG: 'false'
APP_URL: ${APP_URL}
APP_KEY: ${APP_KEY}
RUN_DEPLOY_TASKS_ON_STARTUP: 'true'
LOG_CHANNEL: stack
LOG_LEVEL: info
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
AISSTREAM_API_KEY: ${AISSTREAM_API_KEY}
ports:
- '${APP_BIND_PORT:-18080}:8080'
healthcheck:
test:
[
'CMD-SHELL',
'php -r "exit((int)(@file_get_contents(\"http://127.0.0.1:8080/up\")===false));"',
]
interval: 30s
timeout: 5s
retries: 3
start_period: 30s
ais-worker:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
db:
condition: service_healthy
app:
condition: service_healthy
environment:
APP_ENV: production
APP_DEBUG: 'false'
APP_URL: ${APP_URL}
APP_KEY: ${APP_KEY}
RUN_DEPLOY_TASKS_ON_STARTUP: 'false'
RUN_MIGRATIONS_ON_STARTUP: 'true'
LOG_CHANNEL: stack
LOG_LEVEL: info
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
AISSTREAM_API_KEY: ${AISSTREAM_API_KEY}
command: ['php', 'artisan', 'sist:ingest-ais']
analysis-worker:
build:
context: .
dockerfile: Dockerfile
restart: unless-stopped
depends_on:
db:
condition: service_healthy
app:
condition: service_healthy
environment:
APP_ENV: production
APP_DEBUG: 'false'
APP_URL: ${APP_URL}
APP_KEY: ${APP_KEY}
RUN_DEPLOY_TASKS_ON_STARTUP: 'false'
RUN_MIGRATIONS_ON_STARTUP: 'false'
LOG_CHANNEL: stack
LOG_LEVEL: info
DB_CONNECTION: mysql
DB_HOST: db
DB_PORT: 3306
DB_DATABASE: ${DB_DATABASE}
DB_USERNAME: ${DB_USERNAME}
DB_PASSWORD: ${DB_PASSWORD}
command: ['sh', '-c', 'while true; do php artisan sist:analyze-activity; sleep 30; done']
db:
image: mysql:8.4
restart: unless-stopped
environment:
MYSQL_DATABASE: ${DB_DATABASE}
MYSQL_USER: ${DB_USERNAME}
MYSQL_PASSWORD: ${DB_PASSWORD}
MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
volumes:
- sist_mysql_data:/var/lib/mysql
healthcheck:
test:
['CMD-SHELL', 'mysqladmin ping -h localhost -uroot -p"$$DB_ROOT_PASSWORD" --silent']
interval: 10s
timeout: 5s
retries: 12
volumes:
sist_mysql_data: