forked from magma-labs/magma-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml.example
84 lines (75 loc) · 1.42 KB
/
docker-compose.yml.example
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
version: "3"
x-app: &default-app
build:
context: "."
dockerfile: Dockerfile
depends_on:
redis:
condition: service_healthy
db:
condition: service_healthy
env_file:
- .env.local
tty: true
volumes:
- .:/rails
x-assets: &default-assets
build:
context: "."
dockerfile: Dockerfile
env_file:
- .env.local
tty: true
volumes:
- .:/rails
entrypoint: []
ports: []
services:
redis:
image: redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
command: redis-server --requirepass password
ports:
- '6380:6379'
volumes:
- 'redis-data:/data'
networks:
default:
db:
image: postgres:15
healthcheck:
test: ["CMD-SHELL", "pg_isready -U rails"]
interval: 5s
timeout: 5s
retries: 5
ports:
- "5433:5432"
restart: always
environment:
- POSTGRES_USER=rails
- POSTGRES_PASSWORD=password
- POSTGRES_HOST_AUTH_METHOD=trust
volumes:
- 'pg-data:/var/lib/postgresql/data'
- './db/development.sql:/docker-entrypoint-initdb.d/setup.sql'
networks:
default:
web:
<<: *default-app
ports:
- "3000:3000"
networks:
default:
css:
<<: *default-assets
command: bin/rails tailwindcss:watch
volumes:
redis-data: null
pg-data: null
networks:
default:
driver: bridge