-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
146 lines (139 loc) · 4.16 KB
/
Copy pathdocker-compose.yml
File metadata and controls
146 lines (139 loc) · 4.16 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
138
139
140
141
142
143
144
145
146
# RustaSea development stack (laravel/sail parity).
#
# Boots the workspace app alongside the infrastructure it talks to: Postgres
# with pgvector, Redis, MinIO (S3-compatible object storage), and Mailpit
# (SMTP capture + web UI). Every value is overridable from a local `.env`.
#
# `version` is declared so the file also parses under the legacy
# `docker-compose` (v1) binary; the schema is otherwise v2-compatible.
version: "3.8"
services:
app:
build:
context: .
dockerfile: Dockerfile
image: rustasea-app:dev
restart: unless-stopped
ports:
- "8000:8000"
environment:
APP_ENV: ${APP_ENV:-local}
APP_DEBUG: ${APP_DEBUG:-true}
APP_URL: ${APP_URL:-http://localhost:8000}
APP_KEY: ${APP_KEY:-}
# Full connection URL wins over the granular DB_* fields at runtime.
DATABASE_URL: ${DATABASE_URL:-postgres://rustasea:secret@postgres:5432/rustasea}
DB_CONNECTION: ${DB_CONNECTION:-postgres}
DB_HOST: ${DB_HOST:-postgres}
DB_PORT: ${DB_PORT:-5432}
DB_DATABASE: ${DB_DATABASE:-rustasea}
DB_USERNAME: ${DB_USERNAME:-rustasea}
DB_PASSWORD: ${DB_PASSWORD:-secret}
REDIS_URL: ${REDIS_URL:-redis://redis:6379/0}
REDIS_HOST: ${REDIS_HOST:-redis}
REDIS_PORT: ${REDIS_PORT:-6379}
CACHE_PREFIX: ${CACHE_PREFIX:-rustasea-cache-}
QUEUE_CONNECTION: ${QUEUE_CONNECTION:-database}
SESSION_DRIVER: ${SESSION_DRIVER:-memory}
MAIL_MAILER: ${MAIL_MAILER:-smtp}
MAIL_HOST: ${MAIL_HOST:-mailpit}
MAIL_PORT: ${MAIL_PORT:-1025}
MAIL_FROM_ADDRESS: ${MAIL_FROM_ADDRESS:-hello@example.com}
# Object storage backed by MinIO (S3-compatible); enable the
# `rustasea-storage/aws` feature and the `s3` disk to use it.
AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER:-rustasea}
AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD:-rustasea-secret}
AWS_DEFAULT_REGION: ${AWS_DEFAULT_REGION:-us-east-1}
AWS_BUCKET: ${AWS_BUCKET:-rustasea}
AWS_ENDPOINT: ${AWS_ENDPOINT:-http://minio:9000}
LOG_CHANNEL: ${LOG_CHANNEL:-stack}
LOG_LEVEL: ${LOG_LEVEL:-debug}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
minio:
condition: service_healthy
mailpit:
condition: service_healthy
networks:
- rustasea
postgres:
image: pgvector/pgvector:pg16
restart: unless-stopped
ports:
- "5432:5432"
environment:
POSTGRES_DB: ${DB_DATABASE:-rustasea}
POSTGRES_USER: ${DB_USERNAME:-rustasea}
POSTGRES_PASSWORD: ${DB_PASSWORD:-secret}
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${DB_USERNAME:-rustasea} -d ${DB_DATABASE:-rustasea}"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- rustasea
redis:
image: redis:7-alpine
restart: unless-stopped
ports:
- "6379:6379"
volumes:
- redis-data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
- rustasea
minio:
image: minio/minio
restart: unless-stopped
command: server /data --console-address ":9001"
ports:
- "9000:9000"
- "9001:9001"
environment:
MINIO_ROOT_USER: ${MINIO_ROOT_USER:-rustasea}
MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD:-rustasea-secret}
volumes:
- minio-data:/data
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"]
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- rustasea
mailpit:
image: axllent/mailpit
restart: unless-stopped
ports:
- "1025:1025"
- "8025:8025"
environment:
MP_SMTP_AUTH_ACCEPT_ANY: "1"
MP_SMTP_AUTH_ALLOW_INSECURE: "1"
healthcheck:
test: ["CMD", "wget", "-q", "--spider", "http://localhost:8025/"]
interval: 10s
timeout: 5s
retries: 5
start_period: 5s
networks:
- rustasea
volumes:
postgres-data:
redis-data:
minio-data:
networks:
rustasea:
driver: bridge