-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
68 lines (62 loc) · 1.47 KB
/
docker-compose.dev.yml
File metadata and controls
68 lines (62 loc) · 1.47 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
# Rails Docker Compose Configuration
# Development setup with Rails app, Sidekiq, PostgreSQL, and Redis
services:
db:
image: pgvector/pgvector:pg15
environment:
POSTGRES_DB: allspark_development
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5432:5432"
redis:
image: redis:7
ports:
- "6379:6379"
volumes:
- redis_data:/data
web:
build: .
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- db
- redis
environment:
CONTAINER_ROLE: target
DATABASE_URL: postgresql://postgres:password@db:5432/allspark_development
REDIS_URL: redis://redis:6379/0
RAILS_ENV: development
stdin_open: true
tty: true
networks:
- default
- traefik_public
labels:
- "traefik.enable=true"
- "traefik.http.routers.target.rule=Host(`target.localhost`)"
- "traefik.http.services.target.loadbalancer.server.port=3000"
- "traefik.docker.network=traefik_public"
sidekiq:
build: .
command: bundle exec sidekiq
volumes:
- .:/app
depends_on:
- db
- redis
environment:
CONTAINER_ROLE: sidekiq
DATABASE_URL: postgresql://postgres:password@db:5432/allspark_development
REDIS_URL: redis://redis:6379/0
RAILS_ENV: development
volumes:
postgres_data:
redis_data:
networks:
traefik_public:
external: true