-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
59 lines (55 loc) · 1.3 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
version: '3.4'
services:
postgres:
image: postgres:15.5-alpine
ports:
- 127.0.0.1:5432:5432
environment:
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- pg15:/var/lib/postgresql/data
redis:
image: redis:6-alpine
ports:
- "127.0.0.1:6379:6379"
# Optional containers for development
install-deps:
profiles: [ dev ]
image: dev
build: .
command: bash -c "asdf install; bundle install; npm i"
working_dir: /app
volumes:
- .:/app:z
- node-modules:/app/node_modules
- asdf:/root/.asdf
dev:
profiles: [ dev ]
image: dev
build: .
command: bash -c "echo 'Dev container ready, connect with `docker compose exec -it dev /bin/bash`'; /wait-for-sigterm.sh"
environment:
REDIS_URL: redis://redis
DATABASE_SERVER: postgres://postgres@postgres
BINDING: 0.0.0.0
SHAKAPACKER_DEV_SERVER_HOST: 0.0.0.0
working_dir: /app
volumes:
- .:/app:z
- cache:/app/tmp/cache
- asdf:/root/.asdf
ports:
- 127.0.0.1:3000:3000
- 127.0.0.1:3035:3035
depends_on:
postgres:
condition: service_started
redis:
condition: service_started
install-deps:
condition: service_completed_successfully
volumes:
pg15:
node-modules:
asdf:
cache: