-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
123 lines (118 loc) · 3.34 KB
/
docker-compose.yml
File metadata and controls
123 lines (118 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
services:
mysql:
image: mysql:8.0
environment:
MYSQL_ROOT_PASSWORD: secret
MYSQL_DATABASE: sample
MYSQL_USER: laravel
MYSQL_PASSWORD: password
command: --default-authentication-plugin=mysql_native_password
volumes:
- mysql_data:/var/lib/mysql
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
interval: 5s
retries: 30
start_period: 15s
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 3s
retries: 10
app:
build: .
depends_on:
mysql:
condition: service_healthy
redis:
condition: service_healthy
environment:
# Stable APP_KEY shared across app, worker, and seed services so
# serialized closures encrypted by one container can be decrypted
# by another. Local-dev only — override via .env (APP_KEY=...) or
# the shell when running the stack outside this repo.
APP_KEY: ${APP_KEY:-base64:RnT2yvrznADdoG2WROIIFaUTmlbgNRDIFV9bqCCBWLg=}
APP_ENV: local
APP_DEBUG: "true"
APP_URL: http://localhost:8000
# OPENAI_API_KEY is forwarded from the host (or workspace .env) so the
# TravelAgent / Prism workflows can talk to OpenAI. Leave unset to skip
# those workflows.
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: sample
DB_USERNAME: laravel
DB_PASSWORD: password
SHARED_DB_HOST: mysql
SHARED_DB_PORT: 3306
SHARED_DB_DATABASE: sample
SHARED_DB_USERNAME: laravel
SHARED_DB_PASSWORD: password
REDIS_HOST: redis
QUEUE_CONNECTION: redis
CACHE_STORE: redis
SESSION_DRIVER: redis
ports:
- "${APP_PORT:-8000}:8000"
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8000/up"]
interval: 5s
retries: 30
start_period: 30s
worker:
build: .
depends_on:
app:
condition: service_healthy
environment:
APP_KEY: ${APP_KEY:-base64:RnT2yvrznADdoG2WROIIFaUTmlbgNRDIFV9bqCCBWLg=}
APP_ENV: local
APP_DEBUG: "true"
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
DB_CONNECTION: mysql
DB_HOST: mysql
DB_PORT: 3306
DB_DATABASE: sample
DB_USERNAME: laravel
DB_PASSWORD: password
SHARED_DB_HOST: mysql
SHARED_DB_PORT: 3306
SHARED_DB_DATABASE: sample
SHARED_DB_USERNAME: laravel
SHARED_DB_PASSWORD: password
REDIS_HOST: redis
QUEUE_CONNECTION: redis
CACHE_STORE: redis
command: php artisan queue:work redis --queue=default,activity --tries=3 --timeout=60
seed:
build: .
depends_on:
app:
condition: service_healthy
environment:
APP_KEY: ${APP_KEY:-base64:RnT2yvrznADdoG2WROIIFaUTmlbgNRDIFV9bqCCBWLg=}
APP_ENV: local
DB_CONNECTION: mysql
DB_HOST: mysql
DB_DATABASE: sample
DB_USERNAME: laravel
DB_PASSWORD: password
REDIS_HOST: redis
SHARED_DB_HOST: mysql
SHARED_DB_PORT: 3306
SHARED_DB_DATABASE: sample
SHARED_DB_USERNAME: laravel
SHARED_DB_PASSWORD: password
QUEUE_CONNECTION: redis
CACHE_STORE: redis
command: php artisan db:seed --force
profiles:
- seed
volumes:
mysql_data:
redis_data: