-
Notifications
You must be signed in to change notification settings - Fork 251
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
85 lines (79 loc) · 1.9 KB
/
docker-compose.dev.yml
File metadata and controls
85 lines (79 loc) · 1.9 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
# Development: docker compose -f docker-compose.dev.yml up --build
# Builds from the local Dockerfile — use after customizing gems or app code.
x-app: &app
build:
context: .
dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
meilisearch:
condition: service_healthy
env_file: .env
environment: &app-env
DATABASE_URL: postgres://postgres@postgres:5432/spree_production
REDIS_URL: redis://redis:6379/0
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
RAILS_FORCE_SSL: "false"
RAILS_ASSUME_SSL: "false"
MEILISEARCH_URL: http://meilisearch:7700
services:
postgres:
image: postgres:18-alpine
environment:
POSTGRES_HOST_AUTH_METHOD: trust
PGDATA: /var/lib/postgresql/18/docker
volumes:
- postgres_data:/var/lib/postgresql
healthcheck:
test: pg_isready -U postgres
interval: 5s
timeout: 5s
retries: 5
redis:
image: redis:7-alpine
volumes:
- redis_data:/data
healthcheck:
test: redis-cli ping
interval: 5s
timeout: 5s
retries: 5
meilisearch:
image: getmeili/meilisearch:latest
volumes:
- meilisearch_data:/meili_data
ports:
- "7700:7700"
healthcheck:
test: curl -f http://localhost:7700/health || exit 1
interval: 5s
timeout: 5s
retries: 5
web:
<<: *app
ports:
- "${SPREE_PORT:-3000}:3000"
volumes:
- storage_data:/rails/storage
healthcheck:
test: curl -f http://localhost:3000/up || exit 1
interval: 10s
timeout: 5s
retries: 10
start_period: 30s
worker:
<<: *app
command: bundle exec sidekiq
environment:
<<: *app-env
RAILS_MAX_THREADS: ${SIDEKIQ_DB_POOL:-27}
volumes:
- storage_data:/rails/storage
volumes:
postgres_data:
redis_data:
meilisearch_data:
storage_data: