-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathdocker-compose.yml
69 lines (60 loc) · 1.23 KB
/
docker-compose.yml
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
version: '3.4'
x-rails: &rails
build:
context: .
dockerfile: Dockerfile.dev
args:
RUBY_VERSION: '3.1.1'
user: $UID:$GID
env_file: .env
tmpfs:
- /tmp
# Keeps the stdin open, so we can attach to our app container's process and
# do stuff such as `byebug` or `binding.pry`
stdin_open: true
# Allows us to send signals (CTRL+C, CTRL+P + CTRL+Q) into the container
tty: true
volumes:
- .:/app:cached
- bundle:/usr/local/bundle
depends_on:
- db
- redis
- mail
services:
web:
<<: *rails
command: bundle exec rails server -b 0.0.0.0
ports:
- '3000:3000'
job:
<<: *rails
command: bundle exec sidekiq -C config/sidekiq.yml
db:
image: postgres:14
volumes:
- postgres:/var/lib/postgresql/data
- ./docker/postgres:/docker-entrypoint-initdb.d/
environment:
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis:6
volumes:
- redis:/data
mail:
image: mailhog/mailhog
ports:
- "1025:1025"
- "8025:8025"
pgweb:
image: sosedoff/pgweb
env_file: .env
command: /usr/bin/pgweb -s --bind=0.0.0.0
ports:
- '8081:8081'
depends_on:
- db
volumes:
postgres:
redis:
bundle: